Certain style of directives do not get their controllers min safed
mark-zacharias opened this issue · 1 comments
mark-zacharias commented
This style of directive will not have the controller function minified.
angular.module('app').directive('myDir', function () {
var directive = {
controller: function($scope){ $scope.data = 'thing';};
};
return directive;
});
Instead you must use:
angular.module('app').directive('myDir', function () {
return {
controller: function($scope){$scope.data = 'thing';};
};
});
eddiemonge commented
Please try https://github.com/olov/ng-annotate. ngmin is now deprecated: #93
If your issue isn't resolved there please open an issue at https://github.com/olov/ng-annotate/issues
If you really want ngmin to fix this issue, feel free to fork it and use that.