MCPcopy Create free account
hub / github.com/angular/angular / getComponentAtNodeIndex

Function getComponentAtNodeIndex

packages/core/src/render3/context_discovery.ts:316–319  ·  view source on GitHub ↗
(nodeIndex: number, lView: LView)

Source from the content-addressed store, hash-verified

314}
315
316export function getComponentAtNodeIndex(nodeIndex: number, lView: LView): {} | null {
317 const tNode = lView[TVIEW].data[nodeIndex] as TNode;
318 return isComponentHost(tNode) ? lView[tNode.directiveStart + tNode.componentOffset] : null;
319}
320
321/**
322 * Returns a map of local references (local reference name => element or directive instance) that

Callers 1

getComponentFunction · 0.90

Calls 1

isComponentHostFunction · 0.90

Tested by

no test coverage detected