New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
customGETLIST doesn't use setParentless correctly #1313
Comments
Note that this works: Restangular.setParentless(['events']);
return Restangular.one("calendars",1).getList("events/search",options); but you get "events/search" search objects instead of "events". |
Hi @Meekohi, you are right, is the problem related to the use of customGETLIST or would the request also be wrong if you just ask for the events?
Thanks |
In my experience, the following is true.
Results in a request to |
Thanks @mcacek, I agree, I have labeled as a bug, we'll try to get it fixed, but any PR would be much appreciated :) |
I'll see what I can do in regards to a PR. |
Alas, this issue was big enough to bounce me back to ngResource. At a high level I think there is a big conflict in Restangular between the nice "auto-magic" routing and the reality of a complicated REST API. Some way to declare up-front what your resources and routes are would be really helpful toward getting clear expected behavior. For completeness, in this case the situation was:
|
It seems like
setParentless
should not change urls when dealing with collections, only single objects. Not sure if this is a documentation or code bug, but doesn't behave how I would expect:The text was updated successfully, but these errors were encountered: