ReflectiveKey
A unique object used for retrieving items from the ReflectiveInjector
.
已弃用: No replacement
class ReflectiveKey {
static numberOfKeys: number
static get(token: Object): ReflectiveKey
constructor(token: Object, id: number)
displayName: string
token: Object
id: number
}
说明
Keys have:
- a system-wide unique
id
. - a
token
.
Key
is used internally by ReflectiveInjector
because its system-wide unique id
allows the injector to store created objects in a more efficient way.
Key
should not be created directly. ReflectiveInjector
creates keys automatically when resolving providers.
静态属性
属性 | 说明 |
---|---|
static numberOfKeys: number | 只读 |
静态方法
Retrieves a |
构造函数
Private |
属性
属性 | 说明 |
---|---|
displayName: string | 只读 |
token: Object | Declared in constructor. |
id: number | Declared in constructor. |