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

Function appendSerializedNodePath

packages/core/src/hydration/annotate.ts:512–522  ·  view source on GitHub ↗

* Helper function to produce a node path (which navigation steps runtime logic * needs to take to locate a node) and stores it in the `NODES` section of the * current serialized view.

(
  ngh: SerializedView,
  tNode: TNode,
  lView: LView,
  excludedParentNodes: Set<number> | null,
)

Source from the content-addressed store, hash-verified

510 * current serialized view.
511 */
512function appendSerializedNodePath(
513 ngh: SerializedView,
514 tNode: TNode,
515 lView: LView,
516 excludedParentNodes: Set<number> | null,
517) {
518 const noOffsetIndex = tNode.index - HEADER_OFFSET;
519 ngh[NODES] ??= {};
520 // Ensure we don't calculate the path multiple times.
521 ngh[NODES][noOffsetIndex] ??= calcPathForNode(tNode, lView, excludedParentNodes);
522}
523
524/**
525 * Helper function to append information about a disconnected node.

Callers 2

serializeLViewFunction · 0.85

Calls 1

calcPathForNodeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…