摘要: 方法angular.copy()angular.extend(dst,src) //把src的所有属性复制到dstvar debug = true, Logger = { print: function(s) { return debug ? s : ‘’... 阅读全文
posted @ 2015-06-26 13:59 fannet 阅读(406) 评论(0) 推荐(0)
摘要: 定义模板客户端缓存模板1.模板字串angular.module('myApp', []) .controller('myCtrl', ['$scope','$templateCache', function($scope,$templateCache){ var tmp = 'love... 阅读全文
posted @ 2015-06-25 22:09 fannet 阅读(259) 评论(0) 推荐(0)
摘要: buttonClick Me! //type button|submit|reset, 不设type时默认为 type="submit", 按enter时会自动focus到submit buttoniFramesandbox 阅读全文
posted @ 2015-06-23 12:25 fannet 阅读(138) 评论(0) 推荐(0)
摘要: require引用其他controllervar app = angular.modeule('myapp',[]);app.directive('common',function(){ return { ... controller: function($scope){ ... 阅读全文
posted @ 2015-06-23 00:02 fannet 阅读(165) 评论(0) 推荐(0)
摘要: 是否在线功能angularelement.findele.css$timeout(function () {$(window).trigger('resize');}, 100);javascript constructangular 所以response 同步完成回调angular element... 阅读全文
posted @ 2015-06-19 13:12 fannet 阅读(196) 评论(0) 推荐(0)
摘要: JSON.parse(text [, reviver]) //字符串到js对象JSON.stringify(value [, replacer] [, space]) //js对象到字符串var a='{"k1":"v1","k2":"v2","k3":"v3"}'var r=JSON.parse(... 阅读全文
posted @ 2015-06-19 10:01 fannet 阅读(188) 评论(0) 推荐(0)
摘要: 安装:Install-Package Microsoft.AspNet.WebApi.WebHost引用:System.Web.Http.HttpConfigurationExtensions配置:webapi2public static class WebApiConfig{ public ... 阅读全文
posted @ 2015-06-18 23:24 fannet 阅读(791) 评论(0) 推荐(0)
摘要: ng-model 指令所对应的ngModelController(数据绑定,验证,css更新,格式化) Change me! Required! angular.module('customControl', []).directive('contenteditable',function() ... 阅读全文
posted @ 2015-06-18 00:28 fannet 阅读(248) 评论(0) 推荐(0)
摘要: $scope.$emit('eventName',parameter) //子作用域向父作用域发送事件,可以取消$scope.$broadcast('eventName',parameter) //父作用域向子作用域发送事件,无法取消$scope.$on('eventName',function... 阅读全文
posted @ 2015-06-17 23:48 fannet 阅读(134) 评论(0) 推荐(0)
摘要: input::-ms-clear { display: none; } 阅读全文
posted @ 2015-06-14 22:18 fannet 阅读(166) 评论(0) 推荐(0)