Angularjs
Angularjs
015646
这个作者很懒,什么都没留下…
展开
-
angularjs 学习日志01
Angularjs介绍AngularJS 诞生于 2009 年,由 Misko Hevery 等人创建,后被 Google 收购。是一款优秀的前端 JS 框架, 已用于 Google 的多款产品当中 如 Gmail、 Calender 等 Maps、 AngularJS有着诸多特性,最为核心的是:MVVM、模块化、自动化双向数据绑定、语义化标签、依赖注入,等原创 2015-09-13 11:38:41 · 274 阅读 · 0 评论 -
angular学习日志05 显示文本 ng-bind
方法1:{{helloworld}}方法2: 两种方法是等量的,如果对于页面要求比较高 建议使用第二种方法展示数据原创 2015-12-24 14:58:18 · 268 阅读 · 0 评论 -
angular学习日志04 购物车!
shoppingcartyourOrder{{item.title}}{{item.price|currency}}{{item.price*item.quantity|currency}}remove angular.module("start",[]).controller('CartController',function($scope原创 2015-12-24 12:59:35 · 281 阅读 · 0 评论 -
angular学习日志03 Hello,World
1.最简单的Hello,WorldDocument{{greeting.text}},Worldangular.module('start',[]).controller('helloworldController',function($scope){$scope.greeting={text:'Hello'}})原创 2015-12-24 10:33:26 · 211 阅读 · 0 评论 -
Angular Provider Factory Service
当你初试 Angular 时,很自然地就会往 controller 和 scope 里堆满不必要的逻辑。一定要早点意识到, controller 这一层应该很薄;也就是说,应用里大部分的业务逻辑和持久化数据都应该放在 service 里。 很多人问道,关于如何在 controller 里保存持久化数据。这就不是 controller 该干的事。出于内存性能的考虑, controller 只在需原创 2015-12-23 17:41:07 · 343 阅读 · 0 评论 -
angular学习日志09 表单验证 ng-form
Documentsign up{{message}}First nameLast name:Email:Age: ng-maxlength='3' ng-min='1' required>Submitng-form>angular.module('start',[]).controller('AddUserController',原创 2015-12-29 10:03:23 · 918 阅读 · 0 评论 -
angular学习日志08 ng-show ng-hide
ng-hide ng-showToggle MenuStunDisintegrateErase from historyangular.module('start',[]).controller('DeathrayMenuController',function($scope){$scope.menuState={show:false原创 2015-12-28 10:47:29 · 295 阅读 · 0 评论 -
angular学习日志07 ng-repeat
ngRepeat{{$index+1}}{{student.name}}Insertangular.module('start',[]).controller('StudentListController',function($scope){$scope.students=[{name:"张三",id:"1"},{name:"李四",原创 2015-12-28 09:50:25 · 284 阅读 · 0 评论 -
angular学习日志02
1.基础指令ng-app 定义应用程序的根元素ng-bind 绑定HTML元素到应用程序数据ng-click 定义元素被点击时的行为ng-controller 为应用程序定义控制器对象ng-disabled 绑定应用程序数据到HTML的disabled属性ng-init 为应用程序定义初始值ng_model 绑定应用程序数据到html元素ng-repeat 为控制原创 2015-09-14 20:23:34 · 549 阅读 · 0 评论 -
angular学习日志06 form表单 ng-submit
formStarting:Recommendation:{{needed}}click!resetangular.module('start',[]).controller('StartUpController',function($scope){$scope.needed=0;$scope.computeNeeded=function(){原创 2015-12-25 10:40:10 · 2398 阅读 · 0 评论