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

Function clearLeavingNodes

packages/core/src/animation/utils.ts:154–163  ·  view source on GitHub ↗
(tNode: TNode, el: HTMLElement)

Source from the content-addressed store, hash-verified

152 * This actually removes the leaving HTML Element in the TNode
153 */
154export function clearLeavingNodes(tNode: TNode, el: HTMLElement): void {
155 const nodes = leavingNodes.get(tNode);
156 if (nodes && nodes.length > 0) {
157 const ix = nodes.findIndex((node) => node.el === el);
158 if (ix > -1) nodes.splice(ix, 1);
159 }
160 if (nodes?.length === 0) {
161 leavingNodes.delete(tNode);
162 }
163}
164
165/**
166 * In the case that we have an existing node that's animating away in a

Callers 3

handleOutAnimationEndFunction · 0.90
animateLeaveClassRunnerFunction · 0.90

Calls 2

getMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected