W3cubDocs

/Angular 2

ReflectiveKey

Experimental Class

Class Overview

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

Class 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.

Constructor

constructor(token: Object, id: number)

Private

Static Members

get(token: Object) : ReflectiveKey

Retrieves a Key for a token.

numberOfKeys : number

Class Details

token : Object
id : number
displayName : string

Returns a stringified token.

exported from @angular/core/index, defined in @angular/core/src/di/reflective_key.ts

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v2.angular.io/docs/ts/latest/api/core/index/ReflectiveKey-class.html