124
rated 0 times
[
126]
[
2]
/ answers: 1 / hits: 7750
/ 10 Years ago, mon, july 21, 2014, 12:00:00
I have the following, but what I'm trying to do is have the $timeout
loop every 10 seconds, but what the below is doing is running the shuffleArray()
then after 10 seconds it fires it again and that is it. It stops there.
$http.post(/content, {Data:JSON.stringify($scope.content)}).success(function(data, status, header, config){
$scope.ourcontent = data;
shuffleArray($scope.ourcontent);
$timeout(function() {
shuffleArray($scope.ourcontent);
}, 10000);
});
More From » angularjs