AngularJS ngcontroller to be reloading data periodically

后端 未结 8 1813
自闭症患者
自闭症患者 2020-12-14 02:17

I have this working implementation af a angularJS app which fetches some links from an URL and paint them. However the links on the URL are being updated constantly, I woul

8条回答
  •  星月不相逢
    2020-12-14 02:57

    I had to change to order to make it work:

    From

    $scope.intervalFunction();
    $rootScope.myAppMainCtrlRefreshRunning = false;
    

    to

    $rootScope.myAppMainCtrlRefreshRunning = false;
    $scope.intervalFunction();
    

    Otherwise the loop only executes once

提交回复
热议问题