Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用这个线程来动态加载组件。我正在尝试在组件之间更改时添加滑动/淡入淡出动画。有谁知道如何使用新的 Angular2 动画来实现这一点?
您是否尝试过注入(来自 angular2/core)?
constructor(private renderer: Renderer) { ... }
然后稍后在您的代码中使用:
this.renderer.animate(freshComponent.location, ..., ..., 0..1, 0..1, '');