angularjs
共 2 篇文章
angularjs购物车demo
<!DOCTYPE html> <html ng-app> <head> <title> New Document </title> <script type="text/javascript" src="angular.js"></script> </head> <body ng-controller='CartController'> <div ng-repeat='item in items'> <span>{{item.title}}</span> <input ng-model='item.quantity'/> <span>{{item.quantity}}</span> <sp…
2014-07-16 13:09 · angularjs · AngularJS
初探angularjs 之helloworld
<html ng-app> <head> <script src="angular-1.0.1.min.js"></script> </head> <body> hello{{yourname||'world'}}<br/> your name:<input type="text" ng-model="yourname" placeholder="xiaoji"> </body> </html> 上例代码是ng-model:绑定一个模板类型yourname,在文本框中输入数据就能马上显示出来,不需要绑定事件
2014-07-09 14:57 · angularjs · AngularJS