MCPcopy Index your code
hub / github.com/angular/angular / resetProjectionState

Function resetProjectionState

packages/core/src/render3/hmr.ts:396–409  ·  view source on GitHub ↗

* Child nodes mutate the `projection` state of their parent node as they're being projected. * This function resets the `project` back to its initial state. * @param tNode

(tNode: TElementNode)

Source from the content-addressed store, hash-verified

394 * @param tNode
395 */
396function resetProjectionState(tNode: TElementNode): void {
397 // The `projection` is mutated by child nodes as they're being projected. We need to
398 // reset it to the initial state so projection works after the template is swapped out.
399 if (tNode.projection !== null) {
400 for (const current of tNode.projection) {
401 if (isTNodeShape(current)) {
402 // Reset `projectionNext` since it can affect the traversal order during projection.
403 current.projectionNext = null;
404 current.flags &= ~TNodeFlags.isProjected;
405 }
406 }
407 tNode.projection = null;
408 }
409}

Callers 1

recreateFunction · 0.85

Calls 1

isTNodeShapeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…