I have a problem on deleting a table row data by using JavaScript splice() method. But i cant delete the data in the meanwhile delete the first and last row of the array.
$scope.StudentDetails is my array which contains all the data like id,name,dept,age,address.,
$scope.deleteData = function (item)
{
var index = $scope.StudentDetails.indexOf(item);
if (index > -1)
{
$scope.StudentDetails.splice(index, 1);
}
};

in the first image i will click delete .then it show below image ..but not delete the exact data. i am using above coding.
using below code load my data and push to the array and populate the date in the table elements.
$scope.Load = function ()
{
$scope.StudentDetails = [];
$http({ method: 'GET', url: '/Home/GetStudentDetails' }).success(function (data)
{
if (data != null)
{
$.each(data.Data, function (index, value)
{
$scope.StudentDetails.push(value);
});
// $scope.checked = false;
}
}).error(function ()
{
alert("Failed");
});
}
Please help anybody!!! Thanks In advance!!!
itemholds?