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
When you want to create interval store promise to variable:
var p = $interval(function() { ... },1000);
And when you want to stop / clear the interval simply use:
$interval.cancel(p);