(value: string | AnimationClassBindingFn)
| 247 | * @codeGenApi |
| 248 | */ |
| 249 | export function ɵɵanimateLeave(value: string | AnimationClassBindingFn): typeof ɵɵanimateLeave { |
| 250 | performanceMarkFeature('NgAnimateLeave'); |
| 251 | |
| 252 | if ((typeof ngServerMode !== 'undefined' && ngServerMode) || !areAnimationSupported) { |
| 253 | return ɵɵanimateLeave; |
| 254 | } |
| 255 | |
| 256 | ngDevMode && assertAnimationTypes(value, 'animate.leave'); |
| 257 | |
| 258 | const lView = getLView(); |
| 259 | const animationsDisabled = areAnimationsDisabled(lView); |
| 260 | if (animationsDisabled) { |
| 261 | return ɵɵanimateLeave; |
| 262 | } |
| 263 | |
| 264 | const tNode = getCurrentTNode()!; |
| 265 | |
| 266 | // Capture NgZone eagerly while the injector is still valid. The animation |
| 267 | // function runs later from the queue, at which point the lView injector |
| 268 | // may have been destroyed. |
| 269 | const ngZone = lView[INJECTOR]!.get(NgZone); |
| 270 | |
| 271 | addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => |
| 272 | runLeaveAnimations(lView, tNode, value, ngZone), |
| 273 | ); |
| 274 | |
| 275 | initializeAnimationQueueScheduler(lView[INJECTOR]); |
| 276 | |
| 277 | return ɵɵanimateLeave; // For chaining |
| 278 | } |
| 279 | |
| 280 | function runLeaveAnimations( |
| 281 | lView: LView, |
nothing calls this directly
no test coverage detected
searching dependent graphs…