填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

ng.getInjector

检索与元素、组件或指令实例关联的 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.