angular-cn/public/docs/js/latest/api/di/InjectPromiseAnnotation-class.jade
2015-06-01 23:18:32 -07:00

46 lines
746 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#L18-L36">angular2/src/di/annotations_impl.ts (line 18)</a>
:markdown
A parameter annotation that specifies a `Promise` of a dependency.
```
class AComponent {
constructor(@InjectPromise(MyService) aServicePromise:Promise<MyService>) {
aServicePromise.then(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