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

Function addAnimationToLView

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

Source from the content-addressed store, hash-verified

380 * @param fn The animation function to be called later
381 */
382export function addAnimationToLView(
383 animations: Map<number, EnterNodeAnimations | LeaveNodeAnimations>,
384 tNode: TNode,
385 fn: RunEnterAnimationFn | RunLeaveAnimationFn,
386) {
387 const nodeAnimations = animations.get(tNode.index) ?? {animateFns: []};
388 nodeAnimations.animateFns.push(fn);
389 animations.set(tNode.index, nodeAnimations);
390}
391
392export function cleanupAfterLeaveAnimations(
393 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