MCPcopy Index your code
hub / github.com/angular/angular / ɵɵanimateEnter

Function ɵɵanimateEnter

packages/core/src/render3/instructions/animation.ts:58–92  ·  view source on GitHub ↗
(value: string | AnimationClassBindingFn)

Source from the content-addressed store, hash-verified

56 * @codeGenApi
57 */
58export 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
94export function runEnterAnimation(
95 lView: LView,

Callers

nothing calls this directly

Calls 11

performanceMarkFeatureFunction · 0.90
assertAnimationTypesFunction · 0.90
getLViewFunction · 0.90
areAnimationsDisabledFunction · 0.90
getCurrentTNodeFunction · 0.90
addAnimationToLViewFunction · 0.90
getLViewEnterAnimationsFunction · 0.90
queueEnterAnimationsFunction · 0.90
runEnterAnimationFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…