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

Function clearLeavingNodes

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

Source from the content-addressed store, hash-verified

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

Callers 4

clearTrackedLeavingNodeFunction · 0.90
handleOutAnimationEndFunction · 0.90
animateLeaveClassRunnerFunction · 0.90

Calls 2

getMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected