ReflectiveKey
class
npm Package | @angular/core |
---|---|
Module | import { ReflectiveKey } from '@angular/core'; |
Source | core/src/di/reflective_key.ts |
Overview
class ReflectiveKey { constructor(token: Object, id: number) static get(token: Object): ReflectiveKey get numberOfKeys: number token: Object id: number get displayName: string }
Description
A unique object used for retrieving items from the ReflectiveInjector
.
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 Members
static get(token: Object): ReflectiveKey
Retrieves a Key
for a token.
get numberOfKeys: number
Constructor
constructor(token: Object, id: number)
Private
Members
token: Object
id: number
get displayName: string
Returns a stringified token.
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v4.angular.io/api/core/ReflectiveKey