View source Improve this doc

angular.noop

API in module ng

Description

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

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

Usage

  1. angular.noop();