Source Code:
(back to article)
Submit
Result:
Report an issue
angular.module('myModule') .service('DataManager', function($interval, $http, Person) { $interval(function(){ $http.get([url]) .then(function(data){ Person.setName(data.name); Person.setListCount(data.count); }); // getting the data every 1 minute }, 60000); })