title: How to remove an item from an array in AngularJS scope?
body: <p>Simple to-do list, but with a delete button on list page for each item:</p>
  
  <p><a href="https://i.stack.imgur.com/s0Oxd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s0Oxd.jpg" alt="enter image description here"></a></p>
  
  <p>Relevant template HTML:</p>
  
  <pre><code>&lt;tr ng-repeat="person in persons"&gt;
    &lt;td&gt;{{person.name}} - # {{person.id}}&lt;/td&gt;
    &lt;td&gt;{{person.description}}&lt;/td&gt;
    &lt;td nowrap=nowrap&gt;
      &lt;a href="#!/edit"&gt;&lt;i class="icon-edit"&gt;&lt;/i&gt;&lt;/a&gt;
      &lt;button ng-click="delete(person)"&gt;&lt;i class="icon-minus-sign"&gt;&lt;/i&gt;&lt;/button&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>Relevant controller method:</p>
  
  <pre><code>$scope.delete = function (person) {
    API.DeletePerson({ id: person.id }, function (success) {
      // I need some code here to pull the person from my scope.
    });
  };
  </code></pre>
  
  <p>I tried <code>$scope.persons.pull(person)</code> and <code>$scope.persons.remove(person)</code>.</p>
  
  <p>Although the database deleted successfully, I can not pull this item from scope and I do not want to make a method call to the server for data the client already has, I just want to remove this one person from scope.</p>
  
  <p>Any ideas?</p>