Classes
Class | Description |
---|---|
A utility class used that constructs and registers resolvers for a dependency injection container. Supports a standard set of object lifetimes. |
Functions
Function | Description |
---|---|
A decorator and DI resolver that will resolve an array of all dependencies registered with the specified key. | |
A decorator that tells the container not to try to inject a dependency. | |
A decorator that specifies what to inject into its target. | |
A decorator that lazily injects a dependency depending on whether the | |
A decorator that indicates that a new instance should be injected scoped to the container that requested the instance. | |
A decorator that indicates that a new instance should be injected. | |
A decorator that allows you to optionally inject a dependency depending on whether the [[ | |
Registers the decorated class as a singleton dependency; the class will only be created once. Each consecutive time the dependency is resolved, the same instance will be returned. | |
Registers the | |
Registers the decorated class as a transient dependency; each time the dependency is resolved a new instance will be created. | |
Registers the |
Interfaces
Interface | Description |
---|---|
Implemented by dependency injection containers. | |
Configuration for a dependency injection container. | |
A Container that is associated with a specific Node in the DOM. | |
Used by the default Resolver to create instances of objects when needed. | |
Used to configure a dependency injection interface key. | |
Implemented by objects that wish to register dependencies in the container by creating resolvers. | |
Implemented by objects that which to register dependencies in a container. | |
Internally, the DI system maps "keys" to "resolvers". A resolver controls how a dependency is resolved. Resolvers for transient, singleton, etc. are provided out of the box, but you can also implement Resolver yourself and supply custom logic for resolution. | |
Implemented by objects capable of resolving services and other dependencies. |
Variables
Variable | Description |
---|---|
The key that resolves the dependency injection Container itself. | |
Configuration for a dependency injection container. | |
A set of default resolvers useful in configuring a container. | |
The gateway to dependency injection APIs. | |
The key that resolves a DOMContainer itself. | |
You can use the resulting Registration of any of the factory methods to register with the container. | |
The key that resolves the ServiceLocator itself. |
Type Aliases
Type Alias | Description |
---|---|
A function capable of asynchronously locating a resolver for a key. | |
A class that declares constructor injected dependencies through a static "inject" field array of keys. | |
A key that is used to register dependencies with a dependency injection container. | |
A function capable of locating the parent container based on a container's owner. | |
Represents an object that can register itself. | |
Represents a custom callback for resolving a request from the container. The handler is the container that is invoking the callback. The requestor is the original container that made the request. The handler and the requestor may not be the same if the request has bubbled up to a parent container in the DI hierarchy. The resolver is the instance of the resolver that stores the callback. This is provided in case the callback needs a place or key against which to store state across resolutions. | |
Represents something resolved from a service locator. | |
Transforms an object after it is created but before it is returned to the requestor. |