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

Poller breaks on minification #31

Closed
AnimaLupi opened this issue Apr 8, 2015 · 5 comments
Closed

Poller breaks on minification #31

AnimaLupi opened this issue Apr 8, 2015 · 5 comments

Comments

@AnimaLupi
Copy link
Contributor

Hello,

when using minification the dependency injection fails.

It could be easily fixed by using the inline annotation, I tried making a pull request (did the fix directly online in github, so hopefully I placed the closing square brakets in the right places :-)

#30

Hope it can be used, ciao!

@jdcaballerov
Copy link

When using a minified version from cdnjs there is no problem. Take a look.
https://cdnjs.cloudflare.com/ajax/libs/angular-poller/0.3.2/angular-poller.min.js

@AnimaLupi
Copy link
Contributor Author

I was using the non-minified version and minifying it myself as I'm using Grunt to perform minification (uglify and mangling to be precise, the latter being the issue as it changes variables names).
Having an annotated injection version could avoid treating this module as a special case in the Grunt chain (I'm lazy, I know :-) ) and also permit the use of the mangling option (to reduce size even more than the non-mangled version).
That being said, thanks for the hint!

@justingrayston
Copy link

If you plumb in ngAnnotate before you uglify you should be ok. This places the dependencies in the array notation etc...

@AnimaLupi
Copy link
Contributor Author

@justingrayston Thanks, I'll surely end up using ngAnnotate (even if in the beginning I was trying to avoid using that).

My project uses several external modules with the uglify issue due to services declaration syntax and in fact it seems it would take more effort to fork and get pull requests integrated than simply set up ngAnnotate to fix the problem :-)

@emmaguo
Copy link
Owner

emmaguo commented Jul 22, 2015

@AnimaLupi: Merged. Thanks for the PR!:-)

@emmaguo emmaguo closed this as completed Jul 22, 2015
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

4 participants