(value: string | AnimationClassBindingFn)
| 273 | * @codeGenApi |
| 274 | */ |
| 275 | export function ɵɵanimateLeave(value: string | AnimationClassBindingFn): typeof ɵɵanimateLeave { |
| 276 | performanceMarkFeature('NgAnimateLeave'); |
| 277 | |
| 278 | if ((typeof ngServerMode !== 'undefined' && ngServerMode) || !areAnimationSupported) { |
| 279 | return ɵɵanimateLeave; |
| 280 | } |
| 281 | |
| 282 | ngDevMode && assertAnimationTypes(value, 'animate.leave'); |
| 283 | |
| 284 | const lView = getLView(); |
| 285 | const animationsDisabled = areAnimationsDisabled(lView); |
| 286 | if (animationsDisabled) { |
| 287 | return ɵɵanimateLeave; |
| 288 | } |
| 289 | |
| 290 | const tNode = getCurrentTNode()!; |
| 291 | |
| 292 | // Capture NgZone eagerly while the injector is still valid. The animation |
| 293 | // function runs later from the queue, at which point the lView injector |
| 294 | // may have been destroyed. |
| 295 | const ngZone = lView[INJECTOR]!.get(NgZone); |
| 296 | |
| 297 | enableAnimationRuntimeSupport(); |
| 298 | enableViewDetachAnimationsSupport(); |
| 299 | |
| 300 | addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => |
| 301 | runLeaveAnimations(lView, tNode, value, ngZone), |
| 302 | ); |
| 303 | |
| 304 | initializeAnimationQueueScheduler(lView[INJECTOR]); |
| 305 | |
| 306 | return ɵɵanimateLeave; // For chaining |
| 307 | } |
| 308 | |
| 309 | function runLeaveAnimations( |
| 310 | lView: LView, |
nothing calls this directly
no test coverage detected