-
Notifications
You must be signed in to change notification settings - Fork 42
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
ngmin fails to annotate a declaration if it follows an annotated one #50
Comments
I confirm this. just got into this problem in my project. If there are mixed injection annotation in code, all the injections after the explicit syntax is used the functions with implicit injection won't be turned in to explicit form. |
I have found this as well. It seems the bug only happens if you chain declarations off the initial module call. eg, as stated in the OP, this will not work: angular.module('app')
.factory('two', ['$scope', function($scope) {
// ...
}])
.controller('one', function($scope) {
// ...
}); and I've found that this will not work: var mod = angular.module('app')
.factory('two', ['$scope', function($scope) {
// ...
}]);
mod.controller('one', function($scope) {
// ...
}); but that this will: var mod = angular.module('app');
mod.factory('two', ['$scope', function($scope) {
// ...
}]);
mod.controller('one', function($scope) {
// ...
}); |
Does it also fail for when there is a chain where the first one in the chain doesn't require annotation? Because I'm seeing this fail to ngmin properly:
|
…ngmin#89, btford/ngmin#87, btford/ngmin#85, btford/ngmin#78, btford/ngmin#77, btford/ngmin#73, btford/ngmin#70, btford/ngmin#64, btford/ngmin#63, btford/ngmin#61, btford/ngmin#59, btford/ngmin#57, btford/ngmin#56, btford/ngmin#54, btford/ngmin#50, btford/ngmin#46, btford/ngmin#43, btford/ngmin#42, btford/ngmin#37, btford/ngmin#35, btford/ngmin#22
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. |
Annotation does not work for the controller if it follows an annotated factory.
The text was updated successfully, but these errors were encountered: