I am making a demo in which I am fetching data from the server after regular intervals of time using $interval Now I need to stop/cancel this.
$interval
How I can
var interval = $interval(function() { console.log('say hello'); }, 1000); $interval.cancel(interval);