:enter animation is applied to an element when component is rendered the first time. Is there a way to prevent it?
Check this plunker for simple example of width animation:
transition(':enter', [
style({width: 0}),
animate(250, style({width: '*'})),
]),
Just add an empty
:enteranimation to the view parent. In this case the initial child:enteranimation will be disabled, but further animations will work.Template:
Animation:
Here you can find more detailed explanation.