Is there is any way to pass query string with Angularjs resources. I have seen some example which explain how to do it but my scenario is different. I want to pass in my custom metohd.
Example I have seen is like query string in $resource url
Item.query({p: 'item/1'});
app.js
$resourceProvider.defaults.stripTrailingSlashes = false;
apiservice.js
return $resource(Config.getURL() + '/api/:request/', {
request: '@request'
},
{
getmylocation:{
method:'GET',
params:{
request:'getmylocation'
}
},
setItemDetails: {
method: 'POST',
params:{
request:'showlist'
}
},
});
controller
apiService.getmylocation()
Url should look like : http://www.name.com/api/getmylocation?query=newlocation