mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
bd2868e915
Animation runner functions (runEnterAnimation, runLeaveAnimations, runLeaveAnimationFunction) execute asynchronously from the animation queue via afterNextRender. By that time the lView injector may have been destroyed, causing lView[INJECTOR].get(NgZone) to throw NG0205. Move the NgZone and MAX_ANIMATION_TIMEOUT lookups into the setup instructions (ɵɵanimateEnter, ɵɵanimateLeave, ɵɵanimateLeaveListener) which run synchronously during template processing when the injector is guaranteed to be valid, and pass them through the closures.