title: How to delete one item by AngularJS?
body: <p>Hey guys I want to delete item by id in an AngularJS function. How can I get id from delete button?</p>
  
  <pre><code>&lt;table data-ng-app="myApp" data-ng-controller="myController"&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;th&gt;ID&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;School&lt;/th&gt;
              &lt;th&gt;Gender&lt;/th&gt;
              &lt;th&gt;Email&lt;/th&gt;
              &lt;th&gt;Update&lt;/th&gt;
              &lt;th&gt;Delete&lt;/th&gt;
          &lt;/tr&gt;
          &lt;tr data-ng-repeat="student in students"&gt;
              &lt;td&gt;{{student.id}}&lt;/td&gt;
              &lt;td&gt;{{student.name}}&lt;/td&gt;
              &lt;td&gt;{{student.school}}&lt;/td&gt;
              &lt;td&gt;{{student.gender}}&lt;/td&gt;
              &lt;td&gt;{{student.email}}&lt;/td&gt;
              &lt;td&gt;&lt;a href="#" id="tagaUpdate" &gt;Update&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href="#" id="tagaDelete" data-ng-click="deleteItem({{student.id}})"&gt;Delete&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt; 
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>var myApp = angular.module('myApp', []);
  myApp.controller("myController", function ($scope) {
      $scope.deleteItem = function (id) {
          alert(id);//it doesn't show alert here
      };
  });
  </code></pre>
  
  <p>I think the problem is here <code>data-ng-click="deleteItem({{student.id}})"</code>. But when I check it shows me value <code>data-ng-click="deleteItem(5)</code>.</p>