https://github.com/lianbinghua

摘要: angular.module('docsIsolateScopeDirective', []).controller('Controller', ['$scope', function($scope) { $scope.naomi="aaa";}]).directive('myCustom... 阅读全文
posted @ 2015-09-22 17:57 连冰华 阅读(652) 评论(0) 推荐(0) 编辑
摘要: functionlink(scope,element,attrs){...}where:scopeis an Angular scope object.elementis the jqLite-wrapped element that this directive matches.attrsis a... 阅读全文
posted @ 2015-09-22 16:04 连冰华 阅读(402) 评论(0) 推荐(0) 编辑
摘要: $scope.setCookie=function(c_name,value,expiredays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays)... 阅读全文
posted @ 2015-09-22 15:49 连冰华 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 日期格式化:deliciousApp.filter("dateFormat",[function(){ return function(time){ return new Date(Date.parse(time.replace(/-/g, "/"))); }}]);注意... 阅读全文
posted @ 2015-09-22 15:40 连冰华 阅读(189) 评论(0) 推荐(0) 编辑
摘要: $scope.countdown = 10;var myTime = setInterval(function() { $scope.countdown--; $scope... 阅读全文
posted @ 2015-09-22 15:28 连冰华 阅读(574) 评论(0) 推荐(0) 编辑
摘要: $watch是一个scope函数,用于监听模型变化,当你的模型部分发生变化时它会通知你。$watch(watchExpression, listener, objectEquality);每个参数的说明如下:watchExpression:监听的对象,它可以是一个angular表达式如'name',... 阅读全文
posted @ 2015-09-22 11:13 连冰华 阅读(288) 评论(0) 推荐(0) 编辑
摘要: Template-expanding directive: angular.module('docsSimpleDirective', []).controller('Controller', ['$scope', function($scope) { $scope.customer = { ... 阅读全文
posted @ 2015-09-22 09:35 连冰华 阅读(222) 评论(0) 推荐(0) 编辑