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

Function getTemplateConsumer

packages/core/src/render3/util/signal_debug.ts:69–79  ·  view source on GitHub ↗

* * @param injector * @returns Template consumer of given NodeInjector

(injector: NodeInjector)

Source from the content-addressed store, hash-verified

67 * @returns Template consumer of given NodeInjector
68 */
69function getTemplateConsumer(injector: NodeInjector): ReactiveLViewConsumer | null {
70 const tNode = getNodeInjectorTNode(injector)!;
71 assertTNode(tNode);
72 const lView = getNodeInjectorLView(injector)!;
73 assertLView(lView);
74 const templateLView = lView[tNode.index]!;
75 if (isLView(templateLView)) {
76 return templateLView[REACTIVE_TEMPLATE_CONSUMER] ?? null;
77 }
78 return null;
79}
80
81/**
82 * Maps a `ReactiveNode` to its generated unique string ID for DevTools.

Callers 1

getSignalGraphFunction · 0.85

Calls 5

getNodeInjectorTNodeFunction · 0.90
assertTNodeFunction · 0.90
getNodeInjectorLViewFunction · 0.90
assertLViewFunction · 0.90
isLViewFunction · 0.90

Tested by

no test coverage detected