This is the archived documentation for Angular v6. Please visit angular.io to see documentation for the current version of Angular.

ReflectiveKey

A unique object used for retrieving items from the ReflectiveInjector.

See more...

Deprecated: No replacement

      
      class ReflectiveKey {
  static numberOfKeys: number
  static get(token: Object): ReflectiveKey
  constructor(token: Object, id: number)
  displayName: string
  token: Object
  id: number
}
    

Description

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 properties

Property Description
static numberOfKeys: number Read-only.

Static methods

Retrieves a Key for a token.

static get(token: Object): ReflectiveKey
      
      static get(token: Object): ReflectiveKey
    

Parameters

token

Type: Object.

Returns

ReflectiveKey

Constructor

Private

constructor(token: Object, id: number)
      
      constructor(token: Object, id: number)
    

Parameters

token

Type: Object.

id

Type: number.

Properties

Property Description
displayName: string Read-only.
token: Object Declared in constructor.
id: number Declared in constructor.