The documentation here says that:
url – {string} – action specific url override.
The url templating is supported just like for the resource-level urls.
I would like to use this good feature, I tried this:
angular.module("experience", ['ngResource'])
.factory('Experience', function ($resource, identity) {
return $resource("api/experiences/:id", {}, {
queryAll : {
method : 'GET',
url : 'api/companies/' + identity.id + '/experiences',
isArray : true
}
});
});
You see I am trying to overwrite the url for queryAll method. but this does not work, the query still sends the url api/experiences. is this really supported or I am doing somehting wrong? thanks for any help.
$resource("api/xxx",...)instead of yours$resource("api/xxx/:id",..)