(value: string | AnimationClassBindingFn)
| 56 | * @codeGenApi |
| 57 | */ |
| 58 | export function ɵɵanimateEnter(value: string | AnimationClassBindingFn): typeof ɵɵanimateEnter { |
| 59 | performanceMarkFeature('NgAnimateEnter'); |
| 60 | |
| 61 | if ((typeof ngServerMode !== 'undefined' && ngServerMode) || !areAnimationSupported) { |
| 62 | return ɵɵanimateEnter; |
| 63 | } |
| 64 | ngDevMode && assertAnimationTypes(value, 'animate.enter'); |
| 65 | |
| 66 | const lView = getLView(); |
| 67 | if (areAnimationsDisabled(lView)) { |
| 68 | return ɵɵanimateEnter; |
| 69 | } |
| 70 | |
| 71 | const tNode = getCurrentTNode()!; |
| 72 | |
| 73 | // Capture NgZone eagerly while the injector is still valid. The animation |
| 74 | // function runs later from the queue, at which point the lView injector |
| 75 | // may have been destroyed. |
| 76 | const ngZone = lView[INJECTOR]!.get(NgZone); |
| 77 | |
| 78 | addAnimationToLView(getLViewEnterAnimations(lView), tNode, () => |
| 79 | runEnterAnimation(lView, tNode, value, ngZone), |
| 80 | ); |
| 81 | |
| 82 | initializeAnimationQueueScheduler(lView[INJECTOR]); |
| 83 | |
| 84 | // We have to queue here due to the animation instruction being invoked after the element |
| 85 | // instruction. The DOM node has to exist before we can queue an animation. Any node that |
| 86 | // is not inside of control flow needs to get queued here. For nodes inside of control |
| 87 | // flow, those are queued in node_manipulation.ts and are deduped by a Set in the animation |
| 88 | // queue. |
| 89 | queueEnterAnimations(lView[INJECTOR], getLViewEnterAnimations(lView)); |
| 90 | |
| 91 | return ɵɵanimateEnter; // For chaining |
| 92 | } |
| 93 | |
| 94 | export function runEnterAnimation( |
| 95 | lView: LView, |
nothing calls this directly
no test coverage detected
searching dependent graphs…