@Component({
or using the Inject parameter Inject .
@Component({
Parameter decorators are not part of ES2016 (you can think of it as TypeScript). But they can be added to the standard later ).
If you really want to use ES6 / ES7, use a static getter for parameters :
@Component({
In addition, I recommend that you read this article to better understand angular2 Injection Dependency.
source share