Angular. Is there a way to skip enter animation on initial render?

Just add an empty :enter animation to the view parent. In this case the initial child :enter animation will be disabled, but further animations will work.

Template:

<div @parent>
    <div @child>test</div>
</dif>

Animation:

trigger('parent', [
    transition(':enter', [])
])
trigger('child', [
    transition(':enter', [
      style({width: 0}),
      animate(250, style({width: '*'})),
    ]),
])

Here you can find more detailed explanation.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)