请有实践经验的大神帮帮忙,小弟跪谢!
某草草2017-05-15 16:53:21
I have used RequireJS + AngularJS implementation before, but I feel there is no need to use AMD mode to load JS files. Some personal opinions:
AMD's loading looks good, but under normal circumstances, there is not much need to use AMD to load JS, CSS, HTML, etc.
Just a personal suggestion, there are many discussions on the Internet about whether to use AMD mode, just use the one you like best
BTW, the above suggestions are based on PC as the platform
ringa_lee2017-05-15 16:53:21
I wrote a gadget, which is actually a web slides, made by requirejs
+ angularJs
.
Online address: http://leftstick.github.io/front-end-slides/,
Source code: https://github.com/leftstick/front-end-slides/tree/gh-pages
Because it’s not big, it may be helpful to your understanding
过去多啦不再A梦2017-05-15 16:53:21
Use with requirejs
http://github.com/treri/angular-require
Already used in company projects, the effect is good
迷茫2017-05-15 16:53:21
It is recommended to use angular-async-loader to implement asynchronous loading of angular modules, including various controllers, filters, services, directives, etc., and also supports angular-ui-router
http://my.oschina.net/sub/blog/513255/
https://github.com/subchen/angular-async-loader