I am using AnimationBuilder
inside a directive and I need to persist some styles after animation. My current code is:
const animationPlayer: AnimationPlayer = this.animationBuilder.build([
style({ scale: 1 }),
animate('250ms ease-out', style({ scale: 1.25 }))
]).create(this.elementRef.nativeElement);
animationPlayer.play();
The problem is, the final style scale: 1.25
is not persisted. I thought of adding the states but I can't find how to switch states in AnimationBuilder