I'm revisiting a question I previously asked here.
The approach I took involved using the $q.all() method to resolve multiple http calls and then filtering and merging the data. Everything was working fine, but now I want to refresh one of the feeds every 5 minutes. Usually, I would add a timer at the end of my code like this:
var timer = $scope.intervalFunction = function() {
$timeout(function() {
/* function to call $http.get again */
$scope.intervalFunction();
}, 300000)
};
timer();
$timeout.cancel(timer);
My challenge is figuring out how to update just one source without duplicating list items when both sources are merged together. This has been an issue for me in previous attempts.
Any suggestions or insights would be greatly appreciated! Thank you!
JSFiddle link: here