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

Function calcNumRootNodes

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

* Computes the number of root nodes in a given view * (or child nodes in a given container if a tNode is provided).

(tView: TView, lView: LView, tNode: TNode | null)

Source from the content-addressed store, hash-verified

159 * (or child nodes in a given container if a tNode is provided).
160 */
161function calcNumRootNodes(tView: TView, lView: LView, tNode: TNode | null): number {
162 const rootNodes: unknown[] = [];
163 collectNativeNodes(tView, lView, tNode, rootNodes);
164 return rootNodes.length;
165}
166
167/**
168 * Computes the number of root nodes in all views in a given LContainer.

Callers 2

serializeLContainerFunction · 0.85
serializeLViewFunction · 0.85

Calls 1

collectNativeNodesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…