title: How to get AngularJS to update the DOM on ng-repeat array splice? $scope.$apply() returns an error
body: <p><strong>SOLVED</strong> - I have this <a href="http://plnkr.co/edit/vzChlEgJ8Cj8BwWMlF7f?p=preview" rel="nofollow">plunkr</a> which demonstrates the issues I am facing.  This is simple image uploader that also uses <code>FileReader</code> to display the image (thanks to <a href="https://github.com/nervgh/angular-file-upload" rel="nofollow">angular-file-uploads</a>). I have placed this in a dynamic form that which can be added and removed. </p>
  
  <p>Issues:</p>
  
  <ol>
  <li><p>In this <a href="http://plnkr.co/edit/vzChlEgJ8Cj8BwWMlF7f?p=preview" rel="nofollow">plunkr</a>, the <code>dataUrl</code> is not displayed until after <code>Add
  Another Image</code> is clicked.  This may be a plunkr only issue since
  the image is displayed nicely in my site.  --SOLVED</p></li>
  <li><p>If you upload an image onto the first form, then click <code>Add Another Image</code>, and then click the first tab, then delete the first tab, the data is deleted in <code>$scope.images</code> but the DOM is not updated.  Adding a <code>$scope.$apply()</code> results in a digest already in progress error.</p></li>
  <li><p>The old file name is displayed in the upload input but the input is actually empty.</p></li>
  </ol>
  
  <p>My question is: How can the DOM be updated when an image is removed?</p>
  
  <p><strong>Update:</strong>  Issue #1 is solved, but issues #2 and #3 remain.</p>
  
  <p><strong>Update2:</strong> I've tried attaching a <code>$scope.$apply</code> for the <code>&lt;input type="file" onchange="..."</code> but removing the image with <code>splice()</code> does not fire an <code>onchange</code> event. </p>
  
  <p><strong>Update3:</strong> I've added a simple text input with a <code>ng-model="image.caption"</code> to see if the the DOM would update appropiately. It does.  The DOM also updates properly if <code>images[0]</code> is deleted by <code>images[1]</code> already has an image.</p>
  
  <p><strong>Update4:</strong>  Grundy has identified the problem: <code>track by $index</code>. Removing that makes everything work as expected.  Not exactly sure why though.</p>