-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Labels
Description
A common pattern a lot of Angular developers I know (myself included) utilise a pattern like this:
function SomeCtrl () {
}
angular
.module('app', [])
.controller('SomeCtrl', SomeCtrl);
Currently, to make this work we have to do:
// @ngInject
function SomeCtrl () {
}
angular
.module('app', [])
.controller('SomeCtrl', SomeCtrl);
What would the implications be for getting this working with ng-annotate
without using an /** @ngInject */
comment? As the method above becomes more popular, I think one of the main downsides to adoption are having to use the comment - is there a way ng-annotate
can lookup the function based on it's name based on the scope?