检索与元素、组件或指令实例关联的 Injector
。
Retrieves an Injector
associated with an element, component or directive instance.
ng.getInjector(elementOrDir: {} | Element): Injector
参数
elementOrDir | {} | Element | 要为其获取注入器的 DOM 元素、组件或指令实例。 DOM element, component or directive instance for which to retrieve the injector. |
返回值
与元素、组件或指令实例关联的注入器。
Injector
: Injector associated with the element, component or directive instance.