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

Function tryLocateRNodeByPath

packages/core/src/hydration/node_lookup_utils.ts:99–107  ·  view source on GitHub ↗
(
  hydrationInfo: DehydratedView,
  lView: LView<unknown>,
  noOffsetIndex: number,
)

Source from the content-addressed store, hash-verified

97 * @returns an RNode that corresponds to the instruction index or null if no path exists
98 */
99export function tryLocateRNodeByPath(
100 hydrationInfo: DehydratedView,
101 lView: LView<unknown>,
102 noOffsetIndex: number,
103): RNode | null {
104 const nodes = hydrationInfo.data[NODES];
105 const path = nodes?.[noOffsetIndex];
106 return path ? locateRNodeByPath(path, lView) : null;
107}
108
109/**
110 * Locate a node in DOM tree that corresponds to a given TNode.

Callers 1

collectI18nNodesFromDomFunction · 0.90

Calls 1

locateRNodeByPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…