I have problems trying to use the $resource library in AngularJS to send a properly serialized GET request when there is an array of checkboxes (client_status) in my GET parameters.
This is the code I have right now in my controller:
$scope.filters = {
client_status: ["CLIENT_STATUS_FORMER", "CLIENT_STATUS_ACTIVE"],
client_reference: "e"
}
$scope.records = Client.get($scope.filters, function(data){
...
}
The above will send the following GET request:
f.json?client_reference=e&client_status=CLIENT_STATUS_FORMER,CLIENT_STATUS_ACTIVE
However, from what I understand, the above seems like it's not the correct format. Can someone guide me a bit here? The following is what I expect:
f.json?client_reference=e&client_status%5B%5D=CLIENT_STATUS_ACTIVE&client_status%5B%5D=CLIENT_STATUS_FORMER
Your help is greatly appreciated.
Thomas