title: How to delete item from array angularjs?
body: <p>Why I can't remove item from array posts? </p>
  
  <p>html tag for delete item</p>
  
  <pre><code>html tag
  &lt;span ng-click="remove($index)"&gt; delete&lt;/span&gt;
  
  //AngularJS method where I try to delete item
  blog.remove = function(index) {
  blog.posts.splice(index, 1);
  };
  
  //Angular array posts
  blog.posts = [{
      "title": "Blog Post One",
      "comments": [
        {
          "body":"Lorem ipsum dolor sit amet, consectetur adipisicing elit. ",
          "author": "trollguy87"
        }
      ]}];
  </code></pre>
  
  <p>Where can be problem?</p>