I am new to animations in Angular 2 so I might be missing something obvious, but how do I animate elements generated by an *ngFor loop? It seems like the animations are tied to a component and have to be defined in the @Component decorator?
Is the only solution to create a inner component and have that being created in the *ngFor and then animate that?
Here is an example of a fade-in animation for elements generated in a
*ngFor
loop.my.component.ts
my-component.html
NB: If you want to use an animation with a specific state, you should bind the state like this: