Let's say we have:
<li *ngFor="let item of items" [@myTrigger]='state' (@myTrigger.start)="animStart($event)" (@myTrigger.done)="animDone($event)">{{ item }}</li>
And method animDone:
animDetails: string;
animDone(event:any) {
console.log('Ended!');
this.animDetails = 'I am done!';
}
In the view I have {{ animDetails }}
What's strange is while console.log('Ended!') fires appropriately, animDetails does not.
The first animation, nothing gets changed. The second animation (initiated by a click of a button), "I am done!" fires immediately, on start, as opposed to .done.