I know that is it possible to create custom methods using the AngularJs $resource, but I would like to know if it is possible to tell the person that is using the resource what parameter they should provide when calling it.
I am not talking about default values, but more like a guideline of what to provide to call the $resource.
$resource("/api/myEntity/:id", { id: '@id' }, {
getBySlug: {
method: "GET",
url: "/api/MyEntity/GetBySlug/"
//something like : paramsToProvide : {slug : "", etc.}
},
});
//...
myEntity.myCustomMethod({}, function(){
//callback...
});