我正在尝试使用Angularjs Resource从数组中删除一个对象:
CommandeDetail.delete({id:commandeDetail.id});
我的工厂:
.factory('CommandeDetail', function ($resource) {
return $resource('api/commandeDetail/:id', {}, {
'query': { method: 'GET', isArray: true},
'get': {
method: 'GET'
}
});
})
我的对象commandeDetail是(在调用delete之前在Chrome上调试):
commandeDetail:资源
$$ hashKey:"对象:1136"
口径:" douze"
类别:" II"
certificatFournisseur:" AGROCERT"
commande:null
commandeId:10
commentaire:null
dispJ4:0
emballage:" COLIS 10 KG NET"
id:35
marque:" ECOCERT"
最大:10
nbPalettes:0
产品:" ABRICOT"
puht:0
数量:10
皮重:0
valorisation:" Net"
删除在服务器端完成,但我在frontSide上收到此错误:
angular.js:11598 RangeError: Maximum call stack size exceeded
at join (native)
at Object.stringify (native)
at toJson (http://localhost:8080/bower_components/angular/angular.js:1048:15)
at defaults.defaults.transformRequest (http://localhost:8080/bower_components/angular/angular.js:8707:74)
at http://localhost:8080/bower_components/angular/angular.js:8655:12
at forEach (http://localhost:8080/bower_components/angular/angular.js:323:20)
at transformData (http://localhost:8080/bower_components/angular/angular.js:8654:3)
at $get.serverRequest (http://localhost:8080/bower_components/angular/angular.js:9319:23)
at processQueue (http://localhost:8080/bower_components/angular/angular.js:13175:27)
at http://localhost:8080/bower_components/angular/angular.js:13191:27
我不知道可以从哪里来。我的目标非常简单
如果有人可以帮我这个...
感谢