Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain style of directives do not get their controllers min safed #69

Closed
mark-zacharias opened this issue Jan 10, 2014 · 1 comment
Closed

Comments

@mark-zacharias
Copy link

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
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants