-
Notifications
You must be signed in to change notification settings - Fork 150
Closed
Description
Currently, ng-annotate is aggressively annotating functions with .decorator() methods.
Specifically, ui-router's $stateProvider.decorator() method does not use DI injections, and breaks if ngAnnotate processes a file that calls it:
Original:
$stateProvider.decorator('parent', function (state, parentFn) {
doStuff();
});After ng-annotate:
$stateProvider.decorator('parent', ["state", "parentFn", function (state, parentFn) {
doStuff();
}]);Given that ui-router does not expect an array to be passed into this function, any code that calls $stateProvider.decorator() will break if it's processed by ngAnnotate.
Given that decorator is potentially a rather generic name, ng-annotate needs to be a lot less aggressive when matching some of these methods.