Use $interval instead of setInterval

Use the [$interval](https://docs.angularjs.org/api/ng/service/$interval) wrapper for setInterval instead calling `$scope.apply()` inside the normal `setInterval`.