The AngularJS $interval service is similar to JavaScript's window.setInterval function. In angular it is refer to it through the $interval service. The $interval is just wrapper for window.setInterval function so that it will be easy to override, remove or mocked for testing.
The $interval service is executed provided function on every delay milliseconds.
Syntax
The $interval service also allows to specify the count parameter. The specified function executes number of times as count parameter.
Syntax
The $interval service returns a promise which will be notified on each iteration, which can be used to stop or cancel the task by using $interval.cancel(promise) method.
Syntax