How to clear or stop timeInterval in angularjs?
问题 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. How I can achieve this? If I need to restart the process, how should I do that? Secondly, I have one more question: I am fetching data from the server after reqular intervals of time. Is there any need to use $scope.apply or $scope.watch ? Here is my plunker: app.controller('departureContrl',function($scope,test, $interval){ setData(); $interval