interface
An internal resolved representation of a Provider
used by the Injector
.
interface ResolvedReflectiveProvider { key: ReflectiveKey resolvedFactories: ResolvedReflectiveFactory[] multiProvider: boolean }
Property | Description |
---|---|
key: ReflectiveKey | A key, usually a |
resolvedFactories: ResolvedReflectiveFactory[] | Factory function which can return an instance of an object represented by a key. |
multiProvider: boolean | Indicates if the provider is a multi-provider or a regular provider. |
This is usually created automatically by 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');
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v10.angular.io/api/core/ResolvedReflectiveProvider