getInjector
Retrieves an Injector associated with an element, component or directive instance.
API
function getInjector(elementOrDir: {} | Element): Injector;
@paramelementOrDir
{} | ElementDOM element, component or directive instance for which to retrieve the injector.
@returns
InjectorInjector associated with the element, component or directive instance.
Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/core/globals/getInjector