(elementOrDir: Element | {})
| 139 | * @publicApi |
| 140 | */ |
| 141 | export function getInjector(elementOrDir: Element | {}): Injector { |
| 142 | const context = getLContext(elementOrDir)!; |
| 143 | const lView = context ? context.lView : null; |
| 144 | if (lView === null) return Injector.NULL; |
| 145 | |
| 146 | const tNode = lView[TVIEW].data[context.nodeIndex] as TElementNode; |
| 147 | return new NodeInjector(tNode, lView); |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * Retrieve a set of injection tokens at a given DOM node. |
no test coverage detected
searching dependent graphs…