1
Reply

What is the use of angular.noop in Angular 1.*?

Santosh Kumar Adidawarpu

Santosh Kumar Adidawarpu

Nov 16, 2017
137
0

    A function that performs no operations. function method(callback) {var result = calculateResult();(callback || angular.noop)(result); }method(angular.noop); // no callback method(alert(result)); // alert is a callback and alerts resultUseful in situations where we do not require a callback after doing some operation.

    Santosh Kumar Adidawarpu
    November 16, 2017
    0