p.
exported from angular2/di_annotations
defined in angular2/src/di/annotations.js (line 75)
:markdown
A parameter annotation that marks a dependency as optional. (Injects `null` if not found.)
```
class AComponent {
constructor(@Optional() aService:MyService) {
this.aService = aService;
}
}
```
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
()
:markdown