Having the following $resource service:
myService.factory('Phones', function ($resource) {
return $resource('/api/Phones', { phoneName: '@phoneName' }, {
submit: { method: 'POST', },
});
});
Calling submit on the returned $resource object will post the phoneName as a parameter e.g.
/api/Phones?phoneName=Nokia.
However calling the same resource object with the GET method will also use the phoneName parameter as undefined e.g.
/api/Phones?phoneName=undefined.
Is it possible to prevent the phoneName to appear for the GET method using the same $resource object?
Thanks!