title: splice can't remove the first element in javascript
body: <p>In angular2, my HTML is calling removeThisForm in javascript. The event is an object of File Array. For each object in File Array, I generate a form in angular2.</p>
  
  <pre><code>(click)=removeThisForm(event)
  </code></pre>
  
  <p>In javascript, I am trying to remove the file that is passing in. </p>
  
  <pre><code>removeThisForm(file) {
      var removableIndex = arr.indexOf(file);
      if (removeIndex &gt;= 0) {
          arr = arr.splice(removableIndex);
      } 
  </code></pre>
  
  <p>I am able to remove any form passing in, except the first one. I tried shift(), slice() and splice(0,1). When I did splice(0,1), I am getting an error of "Form submission canceled because the form is not connected".</p>