Skip to content
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

Confusion with getList documentation #1465

Open
SandipNirmal opened this issue Mar 17, 2017 · 0 comments
Open

Confusion with getList documentation #1465

SandipNirmal opened this issue Mar 17, 2017 · 0 comments

Comments

@SandipNirmal
Copy link

I was going through the ReadMe and I found

getList(subElement, [queryParams, headers]): Gets a nested resource. subElement is mandatory. It's a string with the name of the nested resource (and URL). For example buildings

But you mentioned something else in issue-450

getList can be called both ways. If it's called in an element one, then it needs a subelement to get to a Collection. Otherwise, it fetches the collection. So the following is the same:

Restangular.one('places', 123).getList('venues')
Restangular.one('places', 123).all('venues').getList()

In actual use, subElement is not manadatory in getList() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant