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

Still does not annotate directive.controller #77

Closed
scottnewman opened this issue Feb 27, 2014 · 5 comments
Closed

Still does not annotate directive.controller #77

scottnewman opened this issue Feb 27, 2014 · 5 comments

Comments

@scottnewman
Copy link

Issue #21 fixed it in part. See there.

But this case still seems to fail (where the directive function is declared globally):

function myDirective($rootScope) {
return {
restrict: 'A',
controller: function($scope) {
this.scope = $scope;
}
}
}

angular.module('some-module').directive('some-directive', myDirective);

Addendum:

This also doesn't work (where the controller function within the directive is declared globally):

function myFunction($scope) {
this.scope = $scope;
}
angular.module('some-module').directive('some-directive', function myDirective($rootScope) {
return {
restrict: 'A',
controller: myFunction
}
});

@gurdiga
Copy link

gurdiga commented Feb 28, 2014

I have prepared two failing tests that illustrate the issue: https://github.com/gurdiga/ngmin/commit/c62e5b64b6c744f4ec075193b11e47e66efe69ad. I hope this clarifies it a bit.

@btford
Copy link
Owner

btford commented Mar 3, 2014

@gurdiga thanks! I'll take a look.

@gfpacheco
Copy link

+1

@santagada
Copy link

has bitten me

@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

6 participants