Function Definition, This and Bind in JavaScript

2013-12-18
阅读 4 分钟
3.6k
I thought I know the Function definition, execution context and the behavior of this in JavaScript. However, I realized that actually I don't or the knowlege is still not firmly grounded in my mind when I wrote some code similar to below snippet but have no instinct of the error.

How to Use Ext Ajax in Promise Style and Test It

2013-12-18
阅读 4 分钟
3.4k
After translated a blog about how Promise works in a more functional programming way, I tried to build something to make Ext Ajax call to work in Promise style as a practice.

Expression in AngularJS Must Be Idempotent and for Multiple Calls

2013-12-10
阅读 6 分钟
2.8k
Recently, I encounter two very interesting issues when using ng-repeat in AngularJS. Not completely understanding the $watch and $digest() is the root cause.

How to Verify JSON Data With AngularJS $httpBackend

2013-12-10
阅读 5 分钟
4k
When we are writing Unit Test for AngularJS Controller or Service, it's pretty common to verify the data posted to server using $httpBackend in ngMock module.

回调函数是指令式的,Promise 是函数式的:Node 错失的最大机会

2013-12-10
阅读 13 分钟
6.7k
我之前都有接触过关于 Promise 的一些文章,但是对它的感觉并不大。因为觉得虽然回调风格确实有问题,但我写的代码还没有复杂到那种程度,所以,要去使用的感觉并不强烈。