AngularJS学习笔记动态清单列表与用户交互

AngularJS 的双向绑定功能,做个动态清单列表挺省心。你只要在 HTML 里用下ng-model,数据就能自动同步,不用手动刷新视图,响应也快。再配合ng-repeatfilter,还能实时显示还剩几件事没做,逻辑清晰不绕弯。

待办项多了怎么办?用ng-class搞定,任务多颜色变下,提醒也更醒目。用户输入方面,监听ng-keyup就行,输完直接触发添加新任务,体验还不错。

代码写起来也不复杂,todo.html是核心页面,bootstrap样式挺清爽,angularJs文件也别漏了。整个结构清楚,功能齐,用来练手或做个小工具都挺合适。

如果你对 AngularJS 还不熟,推荐你看看ng-book,讲得蛮系统的。或者想了解进阶点的,也可以看看NG-Book 2

zip
ToDoList.zip 预估大小:18个文件
folder
bootstrap 文件夹
folder
js 文件夹
file
npm.js 484B
file
bootstrap.js 68KB
file
bootstrap.min.js 36KB
folder
fonts 文件夹
file
glyphicons-halflings-regular.ttf 44KB
file
glyphicons-halflings-regular.woff2 18KB
file
glyphicons-halflings-regular.eot 20KB
file
glyphicons-halflings-regular.svg 106KB
file
glyphicons-halflings-regular.woff 23KB
folder
css 文件夹
file
bootstrap-theme.min.css.map 25KB
file
bootstrap-theme.css.map 47KB
file
bootstrap.min.css.map 529KB
file
bootstrap.min.css 118KB
file
bootstrap-theme.min.css 23KB
file
bootstrap-theme.css 26KB
file
bootstrap.css.map 380KB
file
bootstrap.css 143KB
file
todo.html 2KB
folder
angularJs 文件夹
file
angular.js 1.21MB
zip 文件大小:669.08KB