angular-cn/public/docs/js/latest/api/di_annotations/InjectLazy-class.jade

45 lines
736 B
Plaintext
Raw Normal View History

2015-04-19 16:53:18 -04:00
p.
<span class="location-badge">exported from <a href="/angular2/di_annotations">angular2/di_annotations</a></span>
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/annotations.js#L55">angular2/src/di/annotations.js (line 55)</a>
:markdown
A parameter annotation that creates a synchronous lazy dependency.
```
class AComponent {
constructor(@InjectLazy(MyService) aServiceFn:Function) {
var aService:MyService = aServiceFn();
}
}
```
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
2015-04-20 16:57:43 -04:00
constructor(token)
2015-04-19 16:53:18 -04:00
:markdown
.l-sub-section
h3 token
:markdown