title: Angular ng-repeat how to unwrap promise in template for each item
body: <p>In the past promises returned by a functon used to be able to be bound to a template and when the promise was resolved the value would update automatically in the template. However, I've read that this automatic unwrapping of promises no longer exists.</p>
  
  <p>I've provided simplified code below to give the idea of what I am trying to do. My controller has a dataArray containing objects. Each object contains an id field. The controller has a function that takes the id and returns a promise of some data. In the template I am using an ng-repeat to loop through each object (obj) in dataArray and I want to bind to the resolved value of the promise that getData returns for each obj. However, when I do this, I get the "10 $digest() iterations reached. Aborting!" error which I've read is due to the fact that promises can no longer be bound to a template due to the lack of promise unwrapping.</p>
  
  <p>Controller: </p>
  
  <pre><code>myApp.controller('myCtrl', function($scope, dataStore) {
  
    $scope.someDataArray = dataArray;  // an array of objects
  
    // returns a promise to provide data for the supplied id
    $scope.getData = dataStore.getData(id); 
  
  
  })
  </code></pre>
  
  <p>Template:</p>
  
  <pre><code>&lt;div&gt;
    &lt;table&gt;
      &lt;thead&gt;
          ....
      &lt;/thead&gt;
      &lt;tbody&gt;
        &lt;tr ng-repeat="obj in dataArray"&gt;
          &lt;td&gt;{{obj.item1}}&lt;/td&gt;
          &lt;td&gt;{{getData(obj.id)}}&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;table&gt;
  &lt;div&gt;
  </code></pre>
  
  <p>Does anyone have a good method for passing a value from an array of values in an ng-repeat to a function that returns a promise so that when the promise resolves the value is updated in each table cell of the template?</p>
  
  <p>I know that if I was doing this for a single value I could create a variable for the value on the scope and use the then() function of a promise to set the value. The template would bind to this value. However, as I am using an ng-repeat there will be separate function calls for every obj.id in dataArray.</p>