Details
-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
Description
Currently, we use:
app.controller('mainController', function($scope,$http) {
$scope.message =.....
});
mainController.$inject = ['$scope','$http''];
Both $inject and function order and number of arguments must match exactly or minification will fail. This is very error prone especially on larger projects.
By using ng-annotate, you only need to add the @ngInject to the object/method.