I have variable $scope.data= [{column:\"age\", operator: \">\", value: \"50\"}, {column:\"name\", operator: \"=\", value: \"Tonda\"}]
. And service for submit
The 'params' attribute defines URL query params, which I assume is intended behavior. If it was just a simple object, not an array, then you could just use $save something like
var MyRequest = $resource('/notreally');
$scope.data = new MyRequest;
// get stuff into $scope.data
$scope.doSubmit = function() { $scope.data.$save(); }
To post an array you need to define your own action and pass the data in as second parameter.
$scope.data= [{column:"age", operator: ">", value: "50"},
{column:"name", operator: "=", value: "Tonda"}];
var MyRequest = $resource('/notreally', {}, {saveData: {method:'POST', isArray: true}});
$scope.doSubmit = function() { MyRequest.saveData({}, $scope.data);
http://docs.angularjs.org/api/ngResource.$resource https://docs.angularjs.org/api/ngResource/service/$resource
*Edited to fix misstatements regarding arrays - I thought $resource could not POST arrays, but figured out that I was wrong!