$ npm install --save-dev babel-plugin-ng-annotate
Note: this library depends on the syntax decorators plugin for parsing. Simply $ npm install --save-dev babel-plugin-syntax-decorators
and follow the setup instructions below.
{
"presets": ["es2015"],
"plugins": ["syntax-decorators", "ng-annotate"]
}
@Inject('service1', 'service2', 'service3')
class MyController {
constructor() {
this.service1();
}
method() {
this.service2();
}
anotherMethod() {
this.service3();
}
}
angular.controller('MyController', MyController);