I have a situation where users added sample data as shown in figure. How can I add Delete button which deletes particular sample ONLY. From figure , I want 'Delete Sample 1" to delete Sample 1 records only.
Thanks
Code triggered when Add Sample button is clicked
$scope.addSample = function () {
$scope.partdetails = [
{
"sampleseq": 0,
"sampleid": 1,
"attribute": "Height",
"measureunit": "Centimeter",
"actualvalue": null,
"lowerspec": 1.23,
"upperspec": 3.23,
"notes": null
},
{
"sampleseq": 0,
"sampleid": 2,
"attribute": "Diameter",
"measureunit": "Inches",
"actualvalue": null,
"lowerspec": 1.23,
"upperspec": 3.23,
"notes": null
}
];
$scope.partdetails[0].sampleseq = $scope.sampleCount;
$scope.partdetails[1].sampleseq = $scope.sampleCount;
$scope.partdetailsList.push($scope.partdetails[0]);
$scope.partdetailsList.push($scope.partdetails[1]);
$scope.sampleCount += 1;
}