Source Code:
(back to article)
Submit
Result:
Report an issue
angular.module('myModule') .controller("MyController",function($scope, Person, $interval){ $scope.user = null; $interval(function(){ $http.get([url]) .then(function(data){ $scope.user.name = data.name; $scope.user.count = data.count; }); // getting the data every 1 minute }, 60000); })