I am using a $resource in Angular like this:
function classResource($resource) {
return $resource("/api/classes/:classId");
}
I now want to add OData query options such as $filter or $skip for server-side filtering and paging.
Do I build them using the same technique as with query string parameters? Or is there another way?
OK... here is the code I used to build the parameters.
classResource.query({ $skip: 10, $filter: 'value' },
function (data) {
vm.classes = data;
});
This seems to produce the desired result: "/api/classes?$filter=value&$skip=10"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With