Animation Callbacks

Go back to Tutorial

A callback is fired when an animation is started and also when it is done.

In the keyframes example, you have a trigger called @flyInOut. You can hook those callbacks like this:

hero-list-multistep.component.ts (excerpt)

template: `


<li *ngFor=”let hero of heroes”








The callbacks receive an AnimationEvent that contains useful properties such as fromState, toState and totalTime.

Those callbacks will fire whether or not an animation is picked up.

Go back to Tutorial

Get industry recognized certification – Contact us