An internal resolved representation of a Provider used by the Injector.
It is usually created automatically by Injector.resolveAndCreate.
Injector.resolveAndCreate
It can be created manually, as follows:
var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]); var injector = Injector.fromResolvedProviders(resolvedProviders); expect(injector.get('message')).toEqual('Hello');
A key, usually a Type<any>.
Type<any>
Indicates if the provider is a multi-provider or a regular provider.
Factory function which can return an instance of an object represented by a key.
Generated using TypeDoc
An internal resolved representation of a Provider used by the Injector.
It is usually created automatically by
Injector.resolveAndCreate
.It can be created manually, as follows:
Example (live demo)
var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]); var injector = Injector.fromResolvedProviders(resolvedProviders); expect(injector.get('message')).toEqual('Hello');