角JS $喷油器:modulerr无法实例与轧模块 [英] angular js $injector:modulerr Failed to instantiate module with mangle

查看:139
本文介绍了角JS $喷油器:modulerr无法实例与轧模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试图丑化angularjs应用与轧导致错误。但是我读过,应该由ngmin固定。我用ngmin妥善包扎我的控制器code数组中所要求的角度。我可以证实,ngmin作品和我所有的code被包裹。只有重整导致错误,裂伤:假的作品就好了。任何人都可以确认是否识别码应该是工作,或者有比这导致重整失败的数组问题的其他边缘情况。

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.

感谢。

推荐答案

我无法得到它与NG-min工作。不过,我没有得到它与NG-注释工作。 https://github.com/olov/ng-annotate

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

这对NG-分钟一个梦幻般的替代品。

It's a fantastic replacement for ng-min.

这篇关于角JS $喷油器:modulerr无法实例与轧模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆