[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
AnimationPlayer onStart
and onDone
events emit only once, a new player has to be created to get the events to work again
AnimationPlayer onStart
and onDone
events should work again after the first play
this.animationBuilder.build([
query(
'.child-element',
[
stagger(100, [useAnimation(animation)])
]
)
]);
this.player = builder.create(this.el.nativeElement);
this.player.onStart(() => {
console.log('animation onStart');
});
this.player.onDone(() => {
console.log('animation onDone');
});
https://stackblitz.com/edit/angular-bynhgg?file=src/app/app.component.ts
Be able to reuse the player
Angular version: 7.0.0
Browser:
- [x ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: 8
- Platform: Windows
Others:
Could be related to #26095
This is really annoying, as it defeats the reusability purpose of the AnimationPlayer.
Angular 8.0 issue reproduced here: https://stackblitz.com/edit/angular-na3vhi
Most helpful comment
This is really annoying, as it defeats the reusability purpose of the AnimationPlayer.
Angular 8.0 issue reproduced here: https://stackblitz.com/edit/angular-na3vhi