Angular 4 - AnimationPlayer is deprecated, how to target the current animation
I successfully created a new Angular 4 project. I added the BrowserAnimationModule to my app.module.ts and my basic animations are working. However, in an earlier version of Angular 2, I was able to target the current AnimationPlayer from @ angular / core using the ViewContainerRef like this:
this._ref['_element'].parentView.viewChildren[0].animationPlayers._allPlayers[0]._activePlayer._player;
It worked very well and I was able to get the current time, playback status, playback speed, etc.
Does anyone know how to target the _activePlayer._player equivalent in Angular 4?
Thank.
+3
source to share
No one has answered this question yet
Check out similar questions: