随笔分类 -  Angularjs

摘要:click me app.controller('SelfCtrl', function($scope) { $scope.click = function (... 阅读全文
posted @ 2015-01-14 20:13 粉条 阅读(159) 评论(0) 推荐(0)
摘要:form提供的属性都是用来表示表单的验证状态的,包括:$pristine(表单没有填写记录)、$dirty(表单有填写记录)、$valid(通过验证)、$invalid(未通过验证)、$error(验证错误信息)。除$error外,前四个的值为true或false表示相应的状态 阅读全文
posted @ 2014-09-29 11:14 粉条 阅读(271) 评论(0) 推荐(0)
摘要:app.filter('to_trusted',['$sce',function($sce){ return function(text){ return $sce.trustAsHtml(text); }}]); 阅读全文
posted @ 2014-09-15 10:20 粉条 阅读(164) 评论(0) 推荐(0)
摘要:$filter('date')(new Date(),"yyyy-MM-dd"); 阅读全文
posted @ 2014-08-28 18:44 粉条 阅读(186) 评论(0) 推荐(0)
摘要:实现公式:{{orderBy_expression | orderBy:expression:reverse}}Examplevar app=angular.module("myApp",[]); app.controller("Ctrl",function($scope){ $scope.fri... 阅读全文
posted @ 2014-04-30 01:27 粉条 阅读(597) 评论(0) 推荐(0)
摘要:{{item.title}} {{item.price|currency}} {{item.price*item.quantity|currency}} total:{{t... 阅读全文
posted @ 2014-04-27 00:36 粉条 阅读(172) 评论(0) 推荐(0)
摘要:{{restaurant.name}} {{restaurant.cuisine}} 阅读全文
posted @ 2014-04-26 22:42 粉条 阅读(282) 评论(0) 推荐(0)
摘要:app.controller("headerController",function($scope){ $scope.isError=false; $scope.isWarning=false; $scope.showError=function(){ $scope.... 阅读全文
posted @ 2014-04-26 21:47 粉条 阅读(1460) 评论(0) 推荐(0)
摘要:toggle Menue stun Stun Erase Form history app.controller("DeathraymenueController",function($scope){ ... 阅读全文
posted @ 2014-04-26 20:40 粉条 阅读(484) 评论(0) 推荐(0)
摘要:参数可能因为编码原因,服务器端无法接收到传递的值,这时需要用到补丁来解决这个问题1,下载一个http.patch.js文件,放入YII框架中的js/ng文件架内2angularjs 创建模型部分使用这个补丁,var app=angular.module('MyApp',[],http_patch);... 阅读全文
posted @ 2014-04-14 13:41 粉条 阅读(701) 评论(0) 推荐(0)
摘要:要使用anglarJS需要在头部引用js文件,src=http://code.anqularjs.org/angular-1.0.1.min.js 加上“ng-app”AngularJS就会在domReady的时候自动执行初始化也可以这样 页面加载完毕后自动加载angularangularJS 在任... 阅读全文
posted @ 2014-04-11 02:05 粉条 阅读(451) 评论(0) 推荐(0)

点击右上角即可分享
微信分享提示