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

Function discoverLocalRefs

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

Source from the content-addressed store, hash-verified

323 * exist on a given element.
324 */
325export function discoverLocalRefs(lView: LView, nodeIndex: number): {[key: string]: any} | null {
326 const tNode = lView[TVIEW].data[nodeIndex] as TNode;
327 if (tNode && tNode.localNames) {
328 const result: {[key: string]: any} = {};
329 let localIndex = tNode.index + 1;
330 for (let i = 0; i < tNode.localNames.length; i += 2) {
331 result[tNode.localNames[i]] = lView[localIndex];
332 localIndex++;
333 }
334 return result;
335 }
336
337 return null;
338}

Callers 1

getLocalRefsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected