MCPcopy
hub / github.com/angular/angular / createResultForNode

Function createResultForNode

packages/core/src/render3/queries/query.ts:349–360  ·  view source on GitHub ↗
(lView: LView, tNode: TNode, matchingIdx: number, read: any)

Source from the content-addressed store, hash-verified

347}
348
349function createResultForNode(lView: LView, tNode: TNode, matchingIdx: number, read: any): any {
350 if (matchingIdx === -1) {
351 // if read token and / or strategy is not specified, detect it using appropriate tNode type
352 return createResultByTNodeType(tNode, lView);
353 } else if (matchingIdx === -2) {
354 // read a special token from a node injector
355 return createSpecialToken(lView, tNode, read);
356 } else {
357 // read a token
358 return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode as TElementNode);
359 }
360}
361
362function createSpecialToken(lView: LView, tNode: TNode, read: any): any {
363 if (read === ViewEngine_ElementRef) {

Callers 1

materializeViewResultsFunction · 0.85

Calls 3

getNodeInjectableFunction · 0.90
createResultByTNodeTypeFunction · 0.85
createSpecialTokenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…