Uglify fails - Unknown provider: aProvider <- a #2246
Description
Hi guys,
I ran into an issue yesterday when I've added the angular-bootstrap JS to my project (which has been set up using the Yeoman Angular Generator) and then it failed due to uglification.
I've added the lib via bower (uncompressed!) and it got included into the vendor.js for concatination and minification.
When the file (ui-bootstrap-tpls.js; uncompressed) is concatenated and bundled in one big vendor.js, everything looks fine, but as soon as the uglify task kicks in (with mangle: true = default), this fails (although the grunt ngmin task should rewrite the code to use Angular's inline annotation method):
The error message was pretty much this one:
Error: [$injector:unpr] Unknown provider: aProvider <- a
Pretty much like this bug: yeoman/generator-angular#378
Is this a bug in the angular-bootstrap code and how it's implemented?
Does anybody have an idea why this is happening and how it can be fixed (without turning mangle off)?
Just a hint would be cool! 👍
I've set mangle to false in the uglify.js code... and everything works fine, but I'd really like to turn it back to true again. :)
Regards,
mastix