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