Injector interface
const injector: Injector = ...; injector.get(...);
For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
{@example core/di/ts/injector_spec.ts region='Injector'}
Injector returns itself when given Injector as a token: {@example core/di/ts/injector_spec.ts region='injectInjector'}
Injector
Retrieves an instance from the injector based on the provided token. If not found:
notFoundValue
from v4.0.0 use Type or InjectionToken
{duplicate}
Generated using TypeDoc
Injector interface
const injector: Injector = ...; injector.get(...);
For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
Example
{@example core/di/ts/injector_spec.ts region='Injector'}
Injector
returns itself when givenInjector
as a token: {@example core/di/ts/injector_spec.ts region='injectInjector'}