$interval is an Angular service which wraps the browser's window. setInterval() function. It is also used
to call a JavaScript function repeatedly within a time interval.
var app = angular.module("app", []);
app.controller("MyController", function ($scope, $interval) {
$interval(callAtInterval, 3000);
});
function callAtInterval() {
console.log("Interval occurred");
}