98 lines
1.1 KiB
Plaintext
98 lines
1.1 KiB
Plaintext
|
|
||
|
p.
|
||
|
<span class="location-badge">exported from <a href="/angular2/di">angular2/di</a></span>
|
||
|
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
|
||
|
A unique object used for retrieving items from the Injector.
|
||
|
|
||
|
[Key]s have:
|
||
|
- system wide unique [id].
|
||
|
- [token] usually the [Type] of the instance.
|
||
|
|
||
|
[Key]s are used internaly in [Injector] becouse they have system wide unique [id]s which allow the injector to
|
||
|
index in arrays rather ther look up items in maps.
|
||
|
|
||
|
.l-main-section
|
||
|
h2 Members
|
||
|
.l-sub-section
|
||
|
h3 constructor
|
||
|
|
||
|
|
||
|
pre.prettyprint
|
||
|
code.
|
||
|
(token, id)
|
||
|
|
||
|
|
||
|
|
||
|
:markdown
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
.l-sub-section
|
||
|
h3 get
|
||
|
|
||
|
|
||
|
pre.prettyprint
|
||
|
code.
|
||
|
(token)
|
||
|
|
||
|
|
||
|
|
||
|
:markdown
|
||
|
Retrieve a [Key] for a token.
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
.l-sub-section
|
||
|
h3 id
|
||
|
|
||
|
|
||
|
|
||
|
:markdown
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
.l-sub-section
|
||
|
h3 metadata
|
||
|
|
||
|
|
||
|
|
||
|
:markdown
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
.l-sub-section
|
||
|
h3 numberOfKeys
|
||
|
|
||
|
|
||
|
|
||
|
:markdown
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
.l-sub-section
|
||
|
h3 token
|
||
|
|
||
|
|
||
|
|
||
|
:markdown
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|