ResolvedProvider

export interface ResolvedProvider

exported from angular2/core defined in angular2/src/core/di/provider.ts (line 284)

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([new Provider('message', {useValue: 'Hello'})]); var injector = Injector.fromResolvedProviders(resolvedProviders); expect(injector.get('message')).toEqual('Hello');

Members

key : Key

A key, usually a Type.

resolvedFactories : ResolvedFactory[]

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.