0

I am using Angular 4, I have two components, a nested component (parent-child), simply imagine my child component name is child, and obviously I can import my child to its parent view by using <app-child> HTML element.

I have an animation and when I add the animation to it's not working, but when I move animations into the child component, it's working.


Example

This animation is not working

<app-child *ngFor="let item of child" [@anim-child-list]></app-child>

When I move the animation and its logics to the child component, it works, here is the child component:

<li [@anim-child-list]>
{{item.titme}}
</li>

How is it possible to make a component (here <app-child>) animate?

0 Answers0