摘要:
angular.module('docsIsolateScopeDirective', []).controller('Controller', ['$scope', function($scope) { $scope.naomi="aaa";}]).directive('myCustom... 阅读全文
摘要:
functionlink(scope,element,attrs){...}where:scopeis an Angular scope object.elementis the jqLite-wrapped element that this directive matches.attrsis a... 阅读全文
摘要:
$scope.setCookie=function(c_name,value,expiredays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays)... 阅读全文
摘要:
日期格式化:deliciousApp.filter("dateFormat",[function(){ return function(time){ return new Date(Date.parse(time.replace(/-/g, "/"))); }}]);注意... 阅读全文
摘要:
$scope.countdown = 10;var myTime = setInterval(function() { $scope.countdown--; $scope... 阅读全文
摘要:
$watch是一个scope函数,用于监听模型变化,当你的模型部分发生变化时它会通知你。$watch(watchExpression, listener, objectEquality);每个参数的说明如下:watchExpression:监听的对象,它可以是一个angular表达式如'name',... 阅读全文
摘要:
Template-expanding directive: angular.module('docsSimpleDirective', []).controller('Controller', ['$scope', function($scope) { $scope.customer = { ... 阅读全文