-
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
Decorators not properly annotated #43
Comments
👍 same issue here |
confirmed; this was a silly error on my part. |
This was referenced Oct 21, 2013
This was referenced Oct 21, 2013
I'm not completelly sure if this issue is related in fact $provide.factory isn't ngminfied. .config(function ($provide, $routeProvider) {
var resolve = {
auth: 'authResolve'
};
$provide.factory('authResolve', function (AuthService) {
return AuthService.check();
}); becomes: .config([
'$provide',
'$routeProvider',
function ($provide, $routeProvider) {
var resolve = {
auth: 'authResolve',
cache: 'cacheResolve'
};
$provide.factory('authResolve', function (AuthService) {
return AuthService.check();
}); authResolve is not parsed correctly. |
Still does not work: $provide.decorator("$exceptionHandler", function($delegate, $injector, $log) { is skipped... |
olov
added a commit
to olov/ng-annotate
that referenced
this issue
May 13, 2014
…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
+1 on this, would be really nice! |
Met this issue today |
Try using ng-annotate as that will replace ng-min soon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe the current implementation for annotating AngularJS decorators might be wrong.
It looks like the current decorator test in
simple.js:112
isn't realistic.For example, if you actually used this syntax in an app:
You would get this error:
Uncaught TypeError: Object #<Object> has no method 'decorator'
I believe a valid decorator definition looks more like this:
In this case, the
$delegate
dependency is not being correctly annotated.Unfortunately, I don't have time to work on a PR right now. But I at least wanted to create an issue in case others experience this and are searching. 😄
The text was updated successfully, but these errors were encountered: