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.

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

Usage

angular.noop();