Quantcast
Channel: Server polling with AngularJS - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by abhaga for Server polling with AngularJS

$
0
0

You should be calling the tick function in the callback for query.

function dataCtrl($scope, $timeout, Data) {    $scope.data = [];    (function tick() {        $scope.data = Data.query(function(){            $timeout(tick, 1000);        });    })();};

Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>