MCPcopy Create free account
hub / github.com/angular/angular / addAnimationToLView

Function addAnimationToLView

packages/core/src/animation/utils.ts:407–415  ·  view source on GitHub ↗
(
  animations: Map<number, EnterNodeAnimations | LeaveNodeAnimations>,
  tNode: TNode,
  fn: RunEnterAnimationFn | RunLeaveAnimationFn,
)

Source from the content-addressed store, hash-verified

405 * @param fn The animation function to be called later
406 */
407export function addAnimationToLView(
408 animations: Map<number, EnterNodeAnimations | LeaveNodeAnimations>,
409 tNode: TNode,
410 fn: RunEnterAnimationFn | RunLeaveAnimationFn,
411) {
412 const nodeAnimations = animations.get(tNode.index) ?? {animateFns: []};
413 nodeAnimations.animateFns.push(fn);
414 animations.set(tNode.index, nodeAnimations);
415}
416
417export function cleanupAfterLeaveAnimations(
418 resolvers: VoidFunction[] | undefined,

Callers 4

ɵɵanimateEnterFunction · 0.90
ɵɵanimateEnterListenerFunction · 0.90
ɵɵanimateLeaveFunction · 0.90
ɵɵanimateLeaveListenerFunction · 0.90

Calls 3

getMethod · 0.65
setMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected