title: How to remove item from array with filter in AngularJS?
body: <p>When I click on <code>tr</code> without any filter, my function <code>array.splice()</code> works. Indexes in the array are in the correct order, so the <code>array.splice()</code> works. </p>
  
  <p>When the filter is enable, Indexes in the array are not updated and still in the same order.  So <code>array.splice()</code> removes the wrong item. </p>
  
  <pre><code>    &lt;span ng-click="orderP0 = 'statut_name'; reversePO=!reversePO"&gt;order&lt;/span&gt;
  
      &lt;tr ng-repeat="project in projects | orderBy : orderPO : reverse track by $index" ng-click="remove($event,$index,projects)"&gt;
          &lt;span class="label" ng-bind="project.statut_name"&gt;&lt;/span&gt;
      &lt;/tr&gt;
  
      $scope.remove = function($event,index,array){
          array.splice(index,1);
      };
  </code></pre>
  
  <p>How to update index in the array ? Or How to removes the right item ? </p>