MCPcopy
hub / github.com/angular/angular / getComponentLViewByIndex

Function getComponentLViewByIndex

packages/core/src/render3/util/view_utils.ts:152–158  ·  view source on GitHub ↗
(nodeIndex: number, hostView: LView)

Source from the content-addressed store, hash-verified

150}
151
152export function getComponentLViewByIndex(nodeIndex: number, hostView: LView): LView {
153 // Could be an LView or an LContainer. If LContainer, unwrap to find LView.
154 ngDevMode && assertIndexInRange(hostView, nodeIndex);
155 const slotValue = hostView[nodeIndex];
156 const lView = isLView(slotValue) ? slotValue : slotValue[HOST];
157 return lView;
158}
159
160/** Checks whether a given view is in creation mode */
161export function isCreationMode(view: LView): boolean {

Callers 15

injectRenderer2Function · 0.90
_queryNodeChildrenFunction · 0.90
createViewRefFunction · 0.90
findViaComponentFunction · 0.90
inputBindingUpdateFunction · 0.90
createComponentRefMethod · 0.90
constructorMethod · 0.90
setInputMethod · 0.90
wrapListenerFunction · 0.90
renderComponentFunction · 0.90
markDirtyIfOnPushFunction · 0.90

Calls 2

assertIndexInRangeFunction · 0.90
isLViewFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…