AngularJS ngcontroller to be reloading data periodically

后端 未结 8 1807
自闭症患者
自闭症患者 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:56

    Try this it worked fine for me.
    
    $scope.intervalFunction = function(){
         if ($location.$$absUrl === "current url") {
          $timeout(function() {
          $scope.showAllEmployeeTracking();
          $scope.intervalFunction();
          console.log("loading Interval")
        }, 10000)
        }
      };
    
      // Kick off the interval
      $scope.intervalFunction();
    

提交回复
热议问题