Restangular.remove()函数将请求对象作为查询参数发送(例如:/ users?ids = 1& ids = 2& ids = 3),而不是将这些ID作为正文参数(JSON格式)发送
示例代码:
$scope.users = {}; $scope.myIds = ['1','2','3']; $scope.users.ids = $scope.myIds; var baseUsers = Restangular.all('users'); baseUsers.remove($scope.users).then(function(data){ console.log("Rsp Data :", data); };
如何将此数组 $ scope.users 作为请求正文发送..?