Returns the context containing the dependency matching the given qualifier. Starts searching with this context and then bubbles up to the parent context if not found in this one.
The qualifier to check.
The context containing the dependency matching the given qualifier. Null if not found anywhere.
The parent context or null if this is a root context.
Checks if this context (or its parents) have an injectable matching the given qualifier.
The dependency injection qualifier to look for.
True if context or its parents have a matching injectable, false if not.
Checks if this dependency injection context is currently active.
True if this dependency injection context is active, false if not.
Removes the injectable with the given qualifier from this dependency injection context. It is only removed from this context, the removal does not bubble up the parent hierarchy.
The qualifier to remove.
True if an injectable was found and removed, false if not.
Optional
options: InjectableOptions<[]>Optional
options: InjectableOptions<[]>Registers the given injectable function in this dependency injection context. Using null
in the inject array defines placeholders for pass-through
function parameter. So when injecting a function with inject arguments [ null, Service, null ]
the resolved function expects two parameters which are
filled into the placeholders while Service
is injected automatically.
The value to inject.
The parameter types. Must match the function signature but allows specifying null
as type for marking pass-through parameters.
Optional
name: string | symbol | (string | symbol)[]Optional name (or names) under which to inject the function. If not set then function is only injected via its type.
Registers the given injectable value in this dependency injection context.
The value to inject.
Optional
name: string | symbol | (string | symbol)[]Optional name (or names) under which to inject the value. If not set then value is only injected via its type.
Static
getThe currently active dependency injection context.
Static
getThe root dependency injection context.
Dependency injection context.