angular.noop is an empty function that can be used as a placeholder when you need to pass some function as a param.
function foo (callback) {
// Do a lot of complex things
callback();
}
// Those two have the same effect, but the later is more elegant
foo(function() {});
foo(angular.noop);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…