ResolvedReflectiveProvider
interface
npm Package | @angular/core |
---|---|
Module | import { ResolvedReflectiveProvider } from '@angular/core'; |
Source | core/src/di/reflective_provider.ts |
Interface Overview
interface ResolvedReflectiveProvider { key: ReflectiveKey resolvedFactories: ResolvedReflectiveFactory[] multiProvider: boolean }
Description
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');
Members
key: ReflectiveKey
A key, usually a Type<any>
.
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.
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v4.angular.io/api/core/ResolvedReflectiveProvider