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

Function getTemplateConsumer

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

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

(injector: NodeInjector)

Source from the content-addressed store, hash-verified

44 * @returns Template consumer of given NodeInjector
45 */
46function getTemplateConsumer(injector: NodeInjector): ReactiveLViewConsumer | null {
47 const tNode = getNodeInjectorTNode(injector)!;
48 assertTNode(tNode);
49 const lView = getNodeInjectorLView(injector)!;
50 assertLView(lView);
51 const templateLView = lView[tNode.index]!;
52 if (isLView(templateLView)) {
53 return templateLView[REACTIVE_TEMPLATE_CONSUMER] ?? null;
54 }
55 return null;
56}
57
58const signalDebugMap = new WeakMap<ReactiveNode, string>();
59let counter = 0;

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