title: Angularjs ng-repeat not updating when values are dynamically inserted via http request
body: <p>I am getting some data with http and updating the <code>$scope.comments</code> variable.Then I display it with ng-repeat however variable is updating correctly but ng-repeat is not working. Here is javascript:</p>
  
  <pre><code>$scope.updateComments = function(taskId){
      var contentInput = document.getElementById(taskId);
      contentInput.value = '';
      $http.get('/loadTask/'+taskId).success(function(task){
          angular.forEach(task.comments,function(comment){
              $http.get('/loadComment/'+comment).success(function(c){
                  $scope.comments[comment] = c;
                  console.log('Comments now',$scope.comments);
              });
          });
      });
  }
  </code></pre>
  
  <p>I can't use <code>$scope.$apply</code> because it's already being called by <code>$http</code> request.
  This is html:</p>
  
  <pre><code>   &lt;div class="row"&gt;
              &lt;div class="col-sm-12 col-md-12 col-lg-12"&gt;
                  {{comments}}
                  &lt;div class="comments" ng-repeat="comment in task.comments track by $index"&gt;
  
  
                      &lt;p&gt;&lt;a href="{{comments[comment].author}}"&gt;
                          {{comments[comment].author}}    
                      &lt;/a&gt;{{comments[comment].content}}&lt;/p&gt;
  
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>Also <code>{{comments}}</code> is updating correctly.
  Can anyone help me, thanks in advance!</p>