I am using angularjs 1.6, and trying to create a url using this format
http://localhost:49524//api/products/GDN
where GDN is a parameter I wish to specify.
I have this working using $resource set up as:
$resource(appSettings.serverPath + "/api/products/:id", { id: '@id' });
And my controller contains:
productResource.query({id: vm.searchCriteria}, (data)=> {
vm.products = data;
});
I have tried renaming id to 'search'. However when I do so, the url generated becomes:
http://localhost:49524//api/products?search=GDN
Could someone suggest what I am I missing? Thanks!!