I'm trying to understand animations in angular but I'm having a really hard time with it at the moment. Any learning sources would be appreciated besides this concrete example.
Here is the stackblitz.
My goal is to animate a component every time it is created and destroyed via *ngIf condition.
Current Problems:
- where animation is applied to the parent animation works only on first load (that's the only time it does work)
- animation that is applied to children causes weird glitch: it clones a component for a period of time (obviously less then I have entered anywhere) instead of destroying current component and recreating it after 1 second
I hope it's not too complicated to look at. I created 4 examples so I could figure out what's the difference between using to whom do they really apply: child or the element itself?:enter + :leave as opposed to void => * + * => void, and
Striked issues are answered.
:enterand:leaveare just aliases forvoid => *and* => void, there is no difference - Mike S.