I have a table in which i insert rows dynamically with edit/delete link for each row. Edit row is properly working but when it comes to delete it always deletes the first row.
Here is the code:
<table ng-model="Employee" border="1">
<thead>
..
</thead>
<tbody>
<tr ng-repeat="emp in employees">
<td>{{emp.id}}</td>
..
<td><a href="#" ng-click="EditRow(emp);">Edit</a>   <a href="#" ng-click="DeleteRow(emp);">Delete</a> </td>
</tr>
</tbody>
</table>
corresponding controller code:
$scope.DeleteRow=function(emp) {
$scope.employees.splice(emp,1);
}
It always deletes the first row.Plz help me.