angular.noop

Improve this Doc View Source angular.noop

  1. function in module ng

A function that performs no operations. This function can be useful when writing code in the functional style.

function foo(callback) {
  var result = calculateResult();
  (callback || angular.noop)(result);
}