linkResolvedReflectiveProvider
npm Package | @angular/core |
---|---|
Module | import { ResolvedReflectiveProvider } from '@angular/core'; |
Source | core/src/di/reflective_provider.ts |
linkInterface Overview
interface ResolvedReflectiveProvider {
key: ReflectiveKey
resolvedFactories: ResolvedReflectiveFactory[]
multiProvider: boolean
}
linkDescription
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:
linkExample (live demo)
var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);
var injector = Injector.fromResolvedProviders(resolvedProviders);
expect(injector.get('message')).toEqual('Hello');
linkMembers
resolvedFactories: ResolvedReflectiveFactory[]
Factory function which can return an instance of an object represented by a key.