问题
Anyone know how to catch onDone
callback for new animation system in angular2? There is an animation - and I want to do some stuff onDone
... I saw in sources of angular2 this method at AnimationPlayer
interface, but nothing has been exposed to users...
With best regards! Very appreciate yours answers!
回答1:
With the forthcoming RC6 release this will be supported via (@animation.done)
: https://github.com/angular/angular/commit/45e8e73670b96387fc109921fad299742d3f7cbf
回答2:
Have you tried
import {AnimationPlayer} from '@angular/core';
constructor(animationPlayer:AnimationPlayer) {
animationPlayer.onDone(() => {
console.log('animation done');
});
}
来源:https://stackoverflow.com/questions/38108993/angular2-animation-ondone-callback