* * @param injector * @returns Template consumer of given NodeInjector
(injector: NodeInjector)
| 67 | * @returns Template consumer of given NodeInjector |
| 68 | */ |
| 69 | function 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. |
no test coverage detected