我正在看这个开源项目赏金源的angularjs应用程序 .
我需要一些澄清:
- angular.js如何知道查找模块的位置?
angular.module('constants',[]); angular.module('filters',[]); angular.module('directives',[]); angular.module('services',[]); angular.module('factories',[]); angular.module('resources',[]); angular.module('bountysource',['常数','服务','指令','过滤器','工厂','资源']);
angular.module('activity',['bountysource']); angular.module('筹款人',['bountysource']); angular.module('队员',['bountysource']);
https://github.com/bountysource/frontend/blob/master/src/app/app.js#L29
模块常量,过滤器等位于/ src / common文件夹中
- 我只看到app.js文件中定义的主AppController,其他控制器如何加载或是否有约定?
https://github.com/bountysource/frontend/blob/master/src/app/app.js#L69
不仅是控制器,还有routes.js文件呢?
或者当项目使用gruntjs构建时它是否只是工作b / c它将所有这些组合成一个文件?
1 回答
它们都包含在索引页面中:
https://github.com/bountysource/frontend/blob/master/src/index.html