title: how to delete li in angularjs?
body: <p>I'm a beginner in development cordova angularjs 
  I have a problem that's when i click in delete link ,i remove a last element in li but i want to delete this li selected not the last li </p>
  
  <p>problem:</p>
  
  <p>my code html:</p>
  
  <pre><code>&lt;ul class="list"&gt;
    &lt;div ng-repeat="categorie in categorieData"&gt;  
      &lt;li class="item" id="item{{categorie.idcategorie}}"&gt;
    &lt;a href="" ng-click="SupprimerCategorie(categorie.idcategorie)"&gt; &lt;i class="fa fa-trash-o fa-fw"&gt;&lt;/i&gt; &lt;/a&gt; &lt;a href="" ng-click="ModifierCategorie(categorie.idcategorie)"&gt; &lt;i class="fa fa-pencil fa-fw" &gt;&lt;/i&gt;&lt;/a&gt;{{categorie.nomcategorie}}
  
      &lt;/li&gt;
  
  
    &lt;/div&gt; 
  &lt;/ul&gt;
  </code></pre>
  
  <p>my controller:</p>
  
  <pre><code>$scope.SupprimerCategorie=function(idcategorie) {
  
                     var confirmPopup = $ionicPopup.confirm({
  
                    title: 'Suppression Categorie',
  
                        template: 'Etes-vous sur de vouloir supprimer ce categorie?',
  
                     });
  
                     confirmPopup.then(function(res) {
  
                        if (res) {
  
  
                              $http({method: 'DELETE', url: 'http://127.0.0.1:8080/elodieService/categories/'+ idcategorie}).
                                success(function(data, status, headers, config) {
                                      $location.path("/CreationCategorie");
                                      //remove li 
                                      var index = $scope.categorieData.indexOf(idcategorie);
                                        $scope.categorieData.splice(index, 1);     
  
  
  
  //                                  $("#item"+idcategorie).remove();                        
                                      console.log('You clicked on "OK" button');
                                }).
                                error(function(data, status, headers, config) {
                                });  
                        } 
                          else {
                              $location.path("/CreationCategorie");
  
  
                           console.log('You clicked on "Cancel" button');
  
                        }
  
   });
      }
  </code></pre>