title: How to refresh data in a promise chain?
body: <p>In the following code, what I want to achieve is to make the <code>return $http.get(newurl_3);</code> call every 10 second and refresh the data in the last response. I tried setInterval in different places but could not make it work. </p>
  
  <p>it is actually a chains of promises in 5 steps and in total are more than 100+ line of code. not sure if putting the whole thing in a setInterval is a good practice. </p>
  
  <pre><code>$http.get(url).then(function(data) {
      // playing with data and returning a new promise
      return $http.get(newurl_1); 
  }).then(function (data) {
      return $http.get(newurl_2); 
  }).then(function (data) {
      return $http.get(newurl_3); 
  }).then(function (data) {
      return $http.get(newurl_4); // this call only needs to be refreshed. 
  }).then(function (data) {
      // creating data array for UI. 
      // needs to be refreshed every 10 second to fetch updated data. 
      $scope.UI_presentation_Array = data... 
  })
  </code></pre>