44 lines
646 B
Plaintext
44 lines
646 B
Plaintext
|
|
p.location-badge.
|
|
exported from <a href='../di'>angular2/di</a>
|
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/annotations_impl.ts#L1-L18">angular2/src/di/annotations_impl.ts (line 1)</a>
|
|
|
|
:markdown
|
|
A parameter annotation that specifies a dependency.
|
|
|
|
```
|
|
class AComponent {
|
|
constructor(@Inject(MyService) aService:MyService) {}
|
|
}
|
|
```
|
|
|
|
.l-main-section
|
|
h2 Members
|
|
.l-sub-section
|
|
h3 constructor
|
|
|
|
|
|
pre.prettyprint
|
|
code.
|
|
constructor(public token)
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
h3 token
|
|
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|