2015-04-19 13:53:18 -07:00
|
|
|
|
2015-04-22 08:06:51 -07:00
|
|
|
p.location-badge.
|
2015-04-23 08:27:36 -07:00
|
|
|
exported from <a href="/angular2/di.html">angular2/di</a>
|
2015-04-19 13:53:18 -07:00
|
|
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/key.js#L17">angular2/src/di/key.js (line 17)</a>
|
|
|
|
|
|
|
|
:markdown
|
2015-04-26 08:01:04 -07:00
|
|
|
A unique object used for retrieving items from the <a href='Injector-class.html'><code>Injector</code></a>.
|
2015-04-19 13:53:18 -07:00
|
|
|
|
2015-04-20 13:57:43 -07:00
|
|
|
Keys have:
|
|
|
|
- a system-wide unique `id`.
|
|
|
|
- a `token`, usually the `Type` of the instance.
|
2015-04-19 13:53:18 -07:00
|
|
|
|
2015-04-26 08:01:04 -07:00
|
|
|
Keys are used internally by the <a href='Injector-class.html'><code>Injector</code></a> because their system-wide unique `id`s allow the
|
2015-04-20 13:57:43 -07:00
|
|
|
injector to index in arrays rather than looking up items in maps.
|
2015-04-19 13:53:18 -07:00
|
|
|
|
|
|
|
.l-main-section
|
|
|
|
h2 Members
|
|
|
|
.l-sub-section
|
|
|
|
h3 constructor
|
|
|
|
|
|
|
|
|
|
|
|
pre.prettyprint
|
|
|
|
code.
|
2015-04-20 13:57:43 -07:00
|
|
|
constructor(token, id)
|
2015-04-19 13:53:18 -07:00
|
|
|
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
2015-04-28 06:22:25 -07:00
|
|
|
h3 displayName
|
2015-04-19 13:53:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
:markdown
|
2015-04-28 06:22:25 -07:00
|
|
|
|
2015-04-19 13:53:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
2015-04-28 06:22:25 -07:00
|
|
|
h3 get
|
2015-04-19 13:53:18 -07:00
|
|
|
|
|
|
|
|
2015-04-28 06:22:25 -07:00
|
|
|
pre.prettyprint
|
|
|
|
code.
|
|
|
|
get(token)
|
|
|
|
|
2015-04-19 13:53:18 -07:00
|
|
|
:markdown
|
2015-04-28 06:22:25 -07:00
|
|
|
Retrieves a `Key` for a token.
|
2015-04-19 13:53:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
2015-04-28 06:22:25 -07:00
|
|
|
h3 id
|
2015-04-19 13:53:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
|
|
h3 numberOfKeys
|
|
|
|
|
|
|
|
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
|
|
h3 token
|
|
|
|
|
|
|
|
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|