angular-cn/public/docs/js/latest/api/di/InjectableMetadata-class.jade

46 lines
789 B
Plaintext

p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.32/modules/angular2/src/di/metadata.ts#L65-L83">angular2/src/di/metadata.ts (line 65)</a>
:markdown
A marker metadata that marks a class as available to `Injector` for creation. Used by tooling
for generating constructor stubs.
```
class NeedsService {
constructor(svc:UsefulService) {}
}
@Injectable
class UsefulService {}
```
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor()
:markdown