MCPcopy
hub / github.com/angular/angular / getRootComponents

Function getRootComponents

packages/core/src/render3/util/discovery_utils.ts:127–130  ·  view source on GitHub ↗
(elementOrDir: Element | {})

Source from the content-addressed store, hash-verified

125 * @publicApi
126 */
127export function getRootComponents(elementOrDir: Element | {}): {}[] {
128 const lView = readPatchedLView<{}>(elementOrDir);
129 return lView !== null ? [getRootContext(lView)] : [];
130}
131
132/**
133 * Retrieves an `Injector` associated with an element, component or directive instance.

Callers 2

applyChangesFunction · 0.90

Calls 2

readPatchedLViewFunction · 0.90
getRootContextFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…