angular js $injector:modulerr Failed to instantiate module with mangle

人盡茶涼 提交于 2019-12-13 16:26:25

问题


Trying to uglify angularjs app with mangle causes the error. However I've read that that should be fixed by ngmin. I use ngmin to properly wrap my controller code in an array as required by angular. I can confirm that ngmin works and all my code is wrapped. Only mangling causes the error, mangle:false works just fine. Can anyone confirm whether mangling is supposed to work or if there are edge cases other than the array issue that causes mangling to fail.

Thanks.


回答1:


I could not get it to work with ng-min. However I did get it to work with ng-annotate. https://github.com/olov/ng-annotate

It's a fantastic replacement for ng-min.



来源:https://stackoverflow.com/questions/23549029/angular-js-injectormodulerr-failed-to-instantiate-module-with-mangle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!