问题描述
我对使用编译器工具自动化/简化Angular项目很有兴趣,该工具可能在其他所有工具上都可以使用,但是Angular Inject和Namepacing足够笨拙以逃避编译器知识.最佳/专业的方法是什么?
I have this interest in automate/simplify angular project with a compiler tool, which might work on everything else, but angular inject and namespacing is awkward enough to escape compiler knowledge. What is the best/professional method for doing this?
谢谢,最后一件事,
app.controller('ctrl',['$rootScope',function($rootScope){
...
}]);
在缩小时有效,但是我如何缩小
works when minified, but how do I minify
app.config(['$routeProvider', function($routeProvider){
}]);
当我减少连续动作时,它是否起作用?
and does it work when I minify successive actions?
app.controller(...).directive(...).run(...)
推荐答案
检查ngmin
( https://github.com/btford/ngmin )自动将Dependency-Injection批注添加到AngularJS项目.完成之后,您应该可以使用任何JavaScript缩小器.
Check the ngmin
(https://github.com/btford/ngmin) to automatically add Dependency-Injection annotations to AngularJS project. After this is done you should be able to use any JavaScript minifier.
这篇关于AngularJS:自动化过程以最小化项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!