I want to add data into a new array and remove data from the current list on a button click. Right now it only removes the last item and sometimes two checked items not 4-6 items.
$scope.LoadBack = function () {
for (var i = 0; i < $scope.MyArrold.length; i++) {
if ($scope.MyArrold[i].checked == true) {
$scope.BackList.push(angular.extend({}, $scope.MyArrold[i]));
var index = $scope.MyArrold.indexOf($scope.MyArrold[i]);
$scope.MyArrold.splice(index, 1);
}
}
}