`
文章列表
class ParentComponent implements OnInit{     constructor(protected router: Router){       }       ngOnInit(){         ...     } }   class ChildComponent extends ParentComponent {       constructor(protected router: Router){         super(router);     }     }   Module:   @NgModule ...
<div class="parent" style="width: 100%; position: relative">     <div class="left" style="position: absolute; top: 0; bottom: 0">1</div>     <div class="right">12312312312121213</div> </div>   要让内部的left div,纵向 ...
http://www.jasongj.com/design_pattern/proxy_decorator/
http://misko.hevery.com/code-reviewers-guide/flaw-constructor-does-real-work/
学习资料:http://es6.ruanyifeng.com/#docs/function    1. 箭头函数中的this指代的是定义时的作用域而不是运行时的作用域。原因是箭头函数没有自己的this 2. arguments, super, new.target这三个变量在箭头函数中也不存在,它们指代的都是定义时的外层函数的对应信息。 3. 无法用call(), apply(), bind()改变箭头函数中this的指向。 4. 可以在函数的参数中使用rest参数了,形式是 "...variable_name"。rest参数必须是函数的最后一个参数。利用rest ...
 获取对象自己的属性的数量: var map = {'aaa': 'aaa'}; Object.getOwnPropertyNames(map).length; // 1   判断对象中是否有某个属性: var map = {'aaa': 'aaa'}; map.hasOwnProperty('aaa'); // true        
页面有一个checkbox,默认选中,并且绑定了click事件。在事件的回调函数中使用event.target.checked检查checkbox的最新值。 用户通过鼠标点击checkbox,在回调函数中,event.target.checked的值是false,没问题。 在Jasmine中,如果用jQuery触发click事件,在回调函数中,event.target.checked的值是true,回调函数执行完毕之后,checkbox才变成非选中的状态。 解决办法: 使用document.getElementById获得checkbox,然后触发click事件, 回调函数中就可以得 ...
设计模式六大原则   作者:zhengzhb ,发布于2012-11-2,来源:CSDN   原文作者博客: http://blog.csdn.net/zhengzhb/article/details/7278174 复制来源:http://www.uml.org.cn/sjms/201211023.asp   目录: 设计模式六大原则(1):单一职责原则 设计模式六大原则(2):里氏替换原则
<div class="table">     <div class="row header"></div>     <div class="row"></div>     <div class="row"></div> </div> 要删除除了header之外的行,可以用如下选择器: $('.table .row:not(.header)').remove();
http://stackoverflow.com/questions/280389/how-do-you-find-out-the-caller-function-in-javascript   arguments.callee.caller.
Java的Split函数,只支持正则表达式匹配。所以,在使用时要格外注意。比如:   System.out.println("123|456".split("|").length); System.out.println("123|456".split("\\|").length);   输出结果,第一个是8,第二个是2。
地址:http://www.uml.org.cn/j2ee/201301074.asp
http://wenku.baidu.com/view/3f5950751711cc7931b7165e.html
最近经常要解决以前没做过的功能的Defect,对业务逻辑和代码逻辑都不熟悉,使工作遇到了很大阻力。需要总结一下几个要点,以防忘记: 1. 用原始帐号在DIT上重现问题,弄清楚Defect到底描述的是什么问题,现在是否还存在。有必要的话,还需要另换帐号重现。 2. 用排除法!缩小问题范围,比如通过JS断点,检查Ajax的返回数据。若数据没问题,则可能是前端代码出问题了。若返回的数据有问题,则可能是后台代码有问题,也有小部分可能是传递到后台的参数有问题,但极少见。 3. 弄清后台的逻辑和流程,在各个Service的request和response处设置断点,检查Service的返回数据是否 ...
modernizr.js的介绍:http://www.osmn00.com/translation/221.html
Global site tag (gtag.js) - Google Analytics