angularjs を使用して API を統合しています。
各行にグリッド テーブルと DELETE ボタンがあります。
私のコントローラーには次のコードがあります:
$scope.singleAppDetails = {};
$scope.removeRow = function(detail, index){
var delRes = $http.delete($scope.appUrl + detail.id, detail);
delRes.success(function (data, status, headers, configs) {
console.log(data);
});
delRes.error(function (data, status, headers, configs) {
console.log(data);
});
$scope.singleAppDetails.splice(index, 1);
};
$scope.singleAppDetails には以下が含まれます。
Object {id: "553e20fce4b0f4eb7d13fd13", name: "Amazon", appId: "3ebc86ea-62a7-419f-9f60-dc88b66efa6e", secret: "n9prQ8YSdcxuBAcQ1PX4DUeOUBZoAKqBHnCONrueGoUTE8pqFZ", domain: "e-commerce"}
しかし、コンソールに「TypeError: $scope.singleAppDetails.splice is not a function」というエラーが表示されます。