0.3.1 • Published 7 years ago
rollup-plugin-ng-annotate v0.3.1
rollup-plugin-ng-annotate
Add AngularJS dependency injection annotations inspired by ng-annotate.
Deprecated
ng-annotate with regular expression smell bad, just use babel-plugin-angularjs-annotate.
Usage
just config your .babelrc
below:
{
presets: ['env']
}
Add annotation comment like below:
export /* @ngInject */ function HMRProvider() {
// ...
}
export /* @ngInject */ function HMRStateProviderConfig($stateProvider, $hmrProvider) {
// ...
}
export class ReduxCoreController {
/* @ngInject */
constructor($ngRedux, $scope, $stateParams, taskActions) {
}
}
export class ReduxAssistController {
/* @ngInject */
constructor($injector, $http) {
}
}
Attention
It works fine in personal project, if any problem occur, just issue me.
license
MIT