摘要: http://www.58img.com/web/2220 阅读全文
posted @ 2016-01-08 14:38 Lancelot.Lee 阅读(95) 评论(0) 推荐(0) 编辑
摘要: http://www.runoob.com/jsref/dom-obj-all.html属性 / 方法描述element.accessKey设置或返回accesskey一个元素element.addEventListener()向指定元素添加事件句柄element.appendChild()为元素添... 阅读全文
posted @ 2015-11-23 18:34 Lancelot.Lee 阅读(143) 评论(0) 推荐(0) 编辑
摘要: http://www.angularjs.cn/A09C以下方式会创建新的子作用域,并且进行原型继承:ng-repeat、ng-include、ng-switch、ng-view、ng-controller, 用scope: true和transclude: true创建directive。以下方式... 阅读全文
posted @ 2015-11-04 21:43 Lancelot.Lee 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-10-29 10:15 Lancelot.Lee 阅读(301) 评论(0) 推荐(0) 编辑
摘要: link 函数。 它有三个参数:scope – 指令的scope。在我们的例子中,指令的scope就是父controller的scope。elem – 指令的jQLite(jQuery的子集)包装DOM元素。如果你在引入AngularJS之前引入了jQuery,那么这个元素就是jQuery元素,而不... 阅读全文
posted @ 2015-10-22 12:51 Lancelot.Lee 阅读(481) 评论(0) 推荐(0) 编辑
摘要: 在service里面当我们仅仅需要的是一个方法和数据的集合且不需要处理复杂的逻辑的时候,factory()是一个非常不错的选择。注意:需要使用.config()来配置service的时候不能使用factory()方法service()方法很适合使用在功能控制比较多的service里面注意:需要使用.... 阅读全文
posted @ 2015-10-16 17:56 Lancelot.Lee 阅读(156) 评论(0) 推荐(0) 编辑
摘要: link函数主要用来为DOM元素添加事件监听、监视模型属性变化、以及更新DOM。compile 函数在 link 函数被执行之前用来做一些DOM改造。compile 函数不能访问 scope,并且必须返回一个 link 函数。但是如果没有设置 compile 函数,你可以正常地配置 link 函数,... 阅读全文
posted @ 2015-10-14 16:56 Lancelot.Lee 阅读(181) 评论(0) 推荐(0) 编辑
摘要: var ezCustomerDirectiveFactory = function(){ return { restrict:"E", replace:true, scope:{ name : "@name", ... 阅读全文
posted @ 2015-08-26 16:45 Lancelot.Lee 阅读(122) 评论(0) 推荐(0) 编辑
摘要: HTML的HTTP协议头信息中控制着页面在几个地方的缓存信息,包括浏览器端,中间缓存服务器端(如:squid等),Web服务器端。本文讨论头信息 中带缓存控制信息的HTML页面(JSP/Servlet生成好出来的也是HTML页面)在中间缓存服务器中的缓存情况。 HTTP协议中关于缓存的信息头关键字包... 阅读全文
posted @ 2015-08-26 09:45 Lancelot.Lee 阅读(13683) 评论(0) 推荐(0) 编辑
摘要: myname = "global"; // 全局变量function func() { alert(myname); // "undefined" var myname = "local"; alert(myname); // "local"}func();代码处理分两个阶段,第一... 阅读全文
posted @ 2015-08-25 17:17 Lancelot.Lee 阅读(318) 评论(0) 推荐(0) 编辑