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

Function createResultForNode

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

Source from the content-addressed store, hash-verified

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