title: MEAN delete. Only working once
body: <p>I have a very simple MEAN stack app. I'm almost done with it however I have one little bug.</p>
  
  <p>When I go to delete a line it deletes it fine. However when I try to remove a second or third one etc. It will only remove it from the scope. I have to refresh first for the delete to work on the server side again.</p>
  
  <p>Angular code below</p>
  
  <pre><code>  $scope.deleteNote = function(city){
  
  
       $http({
      method: 'DELETE',
      url: '/city',
      data: city.city,
      headers:{"Content-Type": "application/json;charset=utf-8"} });
  
  
      var index = $scope.cities.indexOf(city.city);
      var cityindex = city.city;
  
  
  
      console.log(cityindex + " at " + index);
      console.log(cityindex);
      console.log($scope);
      $scope.cities.splice(index, 1);
  
  };
  </code></pre>
  
  <p>Node side code</p>
  
  <pre><code>app.delete('/city', function(req,res){
  
  CityDb.findOneAndRemove({city: req.body.city}, function(err, results){
      if (err) throw err;
  
  });
  
  });
  </code></pre>
  
  <p>So whats going on?</p>
  
  <p>site on heroku
  <a href="https://serene-springs-2108.herokuapp.com/#/" rel="nofollow">https://serene-springs-2108.herokuapp.com/#/</a></p>
  
  <p>github for full code</p>
  
  <p><a href="https://github.com/jminterwebs/STBExpress/tree/MEAN/Public/javascript" rel="nofollow">https://github.com/jminterwebs/STBExpress/tree/MEAN/Public/javascript</a></p>