title: JavaScript array.push (object) with Angular ng-repeat not functioning as expected
body: <p>I have almost the exact same snippet of code in other areas of my application and it works perfectly fine.</p>
  
  <p>I'm pushing an object into an empty array and have an ng-repeat in my view.</p>
  
  <p>JavaScript:</p>
  
  <pre><code>$scope.upload = $upload.upload({
      url: BASE + 'files/tasks',
      file: file,
      data: data
  }).success(function(data) {
      for(var i = 0; i &lt; $scope.case.task.notes.length; i++) {
          if($scope.case.task.notes[i].in_api === false) {
              $scope.case.task.notes[i].documents.push(data);
          }
      }
  });
  </code></pre>
  
  <p>When I <code>console.log</code> the <code>$scope.case.task.notes</code> after adding the JSON response to the array, I see the expected result (the note object along with the <code>documents</code> array, with the returned object in the documents array).</p>
  
  <p>In my view, the page has the HTML below augmented with Angular templating:</p>
  
  <pre><code>&lt;div&gt;
      &lt;p class="chat-file row" ng-repeat="document in note.documents track by $index"&gt;
          &lt;b class="pull-left col-sm-6"&gt;
              &lt;i class="fa fa-file"&gt;&lt;/i&gt; {{document.name}} 
          &lt;/b&gt;
          &lt;span class="col-sm-6 pull-right"&gt; 
              &lt;a href="http:/download.com?f={{document.id}}&amp;n={{document.name}}" class="btn btn-xs btn-success"&gt;download&lt;/a&gt; 
          &lt;/span&gt;
      &lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When I first load the page, all of the notes that do have documents show up correctly.  However, when the success function is called from the above <code>upload</code> function, and the document is pushed onto the note's array, it does not appear in the view.</p>
  
  <p>If it makes a difference, the HTML above is also surrounded inside of an <code>ng-repeat</code> that iterates over every note (so it's multi-level).</p>
  
  <p>What could be the problem?  The JavaScript function is functioning appropriately but the view is not updating when the model does.</p>