Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
Say hello to Angular's future home!Check out Angular.devHome
/

ng.getInjector

Retrieves an Injector associated with an element, component or directive instance.

      
      ng.getInjector(elementOrDir: {} | Element): Injector
    
Parameters
elementOrDir {} | Element

DOM element, component or directive instance for which to retrieve the injector.

Returns

Injector: Injector associated with the element, component or directive instance.