有什么开源的 AngularJS 项目可以学习?如果项目能够包括测试用例就更好

2015-12-17 10:20:36 +08:00
 97world
之前公司要求用 AngularJS 来做一个项目.
项目虽然做好了,但是回过头来看,很多地方用得不规范,例如把大量的业务逻辑都往 Controller 这里塞, Services 只是简单的封装了对 RESTful API 的呼叫, Directive 的使用又是非常少,测试用例也是几乎没写.
想参考一些规范的 AngularJS 项目,试着更深入的学习一下
2858 次点击
所在节点    程序员
7 条回复
Phant0m
2015-12-17 10:39:49 +08:00
Phant0m
2015-12-17 10:43:20 +08:00
也可以了解下这个: https://v2ex.com/t/168015#reply31
learnshare
2015-12-17 10:50:16 +08:00
beginor
2015-12-17 10:53:09 +08:00
推荐一个 [Angular Style Guide]( https://github.com/johnpapa/angular-styleguide), 我在项目中就严格遵守这个规范, 效果很好。

我在项目中融合了 RequireJS 实现动态加载注册 Controller 和 Service , 效果挺好的。
stiekel
2015-12-17 11:22:51 +08:00
http://todomvc.com/
这个项目专做演示,使用各种前端框架把同样的功能都实现了一遍,当然有 Angular 的。
demo http://todomvc.com/examples/angularjs/#/
github https://github.com/tastejs/todomvc/tree/master/examples/angularjs
97world
2015-12-17 12:59:02 +08:00
@Phant0m
@learnshare
@beginor
@stiekel
谢谢四位的推荐~
hantsy
2015-12-17 13:35:07 +08:00
Google 官方的 Tutorial 不错。 https://docs.angularjs.org/tutorial

我的 https://github.com/hantsy

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/244125

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX