I'me using this thread in order to load components dynamically. I'm trying to add sliding/fade animation while changing between components. Does anyone has idea how can I achieve this with the new Angular2 animation?
Asked
Active
Viewed 910 times
3
-
What have you tried? Have you checked https://angular.io/docs/ts/latest/guide/animations.html ? – Günter Zöchbauer Aug 10 '16 at 12:19
-
You can try to figure out how animation is done for the router. The router-outlet uses the same method to add components as explained in the thread you linked to. – Günter Zöchbauer Aug 18 '16 at 06:18
1 Answers
0
Have you tried injecting (from angular2/core)?
constructor(private renderer: Renderer) { ... }
Then later in your code using:
this.renderer.animate(freshComponent.location, ..., ..., 0..1, 0..1, '');

Patrick Michalina
- 1,279
- 2
- 12
- 15