W3cubDocs

/Angular 4 TypeScript

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 core/index, defined in core/src/di/reflective_key.ts

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