$interval issue, ends unexpectedly <p>I am new to angularjs so this is probably simple. I have this as my main app entry point:</p> <pre><code>&lt;div ng-app="mainApp"&gt; &lt;div ng-view&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Routed as such:</p> <pre><code>$routeProvider .when('/general', { templateUrl: '/Rewards/SelfService_General', controller: 'GeneralController' }) .when('/resources', { templateUrl: '/Rewards/SelfService_Resources', controller: 'ResourcesController' }) .otherwise({ redirectTo: '/general' }); </code></pre> <p>My resources controller is as such:</p> <pre><code>appRoot.controller('ResourcesController', ['$scope', '$interval', '$http', function ($scope, $interval, $http) { $scope.GetResources = function GetResources() { var requestData = { AccessKey: "", Culture: "" }; $http.post('http://myapi.com/etc', requestData) .success(function (data, status, headers, config) { $scope.ViewName = status; alert('success'); }) .error(function (data, status, headers, config) { $scope.ViewName = status; alert('error'); }); }; $interval($scope.GetResources(), 5000); }]); </code></pre> <p>On loading the page, the GetResources function is immediately called and as expected, hits the error function returning a 401 status. What surprises me is that no further calls to GetResources are made. Why is the interval ended?</p>