Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
seajs如何与angularJS集成起来? #1022
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
edokeh
Nov 21, 2013
Contributor
正好有人问,那就说说近况
之前与 @atian25 探讨过 route 改变时动态加载代码的问题,不过我的思路跟他不太一样,我想要能实现模块的异步加载,不过现在的 angular 还没法支持,所以临时用“伪模块”的概念来实现
刚巧,最近发现了一个 RequireJS 的库,与我的思路不谋而合,准备仔细研究下
https://github.com/nikospara/angular-require-lazy
正好有人问,那就说说近况 刚巧,最近发现了一个 RequireJS 的库,与我的思路不谋而合,准备仔细研究下 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
这个问题问的还挺多的,有时间出个文档。 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
xufei
commented
Jan 25, 2014
用angular的时候,不需要模块加载器,只要文件加载器的功能即可,相当于把seajs退化了用。angular自身已经有模块机制,如果再包一层很折腾 |
@xufei |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
atian25
Jan 26, 2014
@edokeh :
汇报下最近的进度吧, http://blog.getelementsbyidea.com/load-a-module-on-demand-with-angularjs/
这个已经实现了模块级的加载。
主要思路是模拟和重新ng的加载过程。
@xufei:
实践中我们也是基本上用sea来做文件加载器,所以也是挺纠结的。
atian25
commented
Jan 26, 2014
@edokeh : @xufei: |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
edokeh
Jan 26, 2014
Contributor
@atian25
嘿嘿,我也有个差不多成型的方案了,参见 https://github.com/edokeh/klog2/tree/master/app/assets/javascripts/admin
过完春节我来研究下你的
@atian25 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
flappymonkey
commented
Apr 30, 2014
这里有很不错的解决方案,兼容seajs和requirejs |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
atian25
Apr 30, 2014
0_0
如果你仔细看下, 会发现:
ckken/angular-lazyload forked from atian25/angular-lazyload
你发的链接是fork我的 https://github.com/atian25/angular-lazyload
atian25
commented
Apr 30, 2014
0_0 如果你仔细看下, 会发现:
你发的链接是fork我的 https://github.com/atian25/angular-lazyload |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
flappymonkey
commented
May 2, 2014
@atian25 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
lichunqiang
commented
Sep 5, 2014
文档快到碗里来 @popomore |
ch-hui commentedNov 19, 2013
项目中想要用seajs作为模块加载器来管理系统中的各个JS模块,同时也能正常使用angularJS,应该怎么做呢?