-
Notifications
You must be signed in to change notification settings - Fork 832
Open
Labels
Description
Is there a simple way to tell restangular that a certain field is a collection of resources?
For instance in my app I can do:
GET to: /api/courses/123
Restangular.one('courses', 123).get();
/* OR */
GET to: /api/courses/123/students
Restangular.one('courses', 123).all('students').getList();The first call however, fetches the course with a field students that already contains an array of the students in the course. Is there any way to say: "Restangular, this array is not merely an array of objects, but rather it's a student collection" so that then I can do things like students[0].remove()
Unrelated: Vamos a ganar el mundial o no?