Closed AlJohri closed 10 years ago
If you think this is a feature one might want, let me know and I can make a configurable PR. This will probably work along side the Custom Serializer https://github.com/FacultyCreative/ngActiveResource/issues/18 that @brainyverse is working on.
Otherwise, this issue can be closed.
Once again, sorry for the notifications!
@AlJohri -- sorry I missed these. This is an excellent question, and a good solve. I'm looking forward to a major refactor that allows models to evolve according to hypermedia and response headers. Look out for a future release :)
https://github.com/mgonto/restangular#my-response-is-actually-wrapped-with-some-metadata-how- do-i-get-the-data-in-that-case
What's a good place to store metadata from each request if I'm paginating data?
EDIT: I realize I actually probably don't need to store it in the model I'd just like to figure out a mechanism for returning it so I can know out how many requests need to be made. I'll try to explore a custom $http interceptor.
EDIT2: I created an $http interceptor and can modify the data to work properly with ngActiveResource but I then lose the metadata. I need to modify the promise returned by active-resource's "where" function to return an object with data and metadata.
EDIT3: Figured it out. Sorry for all the notifications!
View Diff Here: https://github.com/AlJohri/ngActiveResource/commit/1e68e3cb0e4875e1c1627727f40ea431e97d7a4b base.js in _this.where function
CC: @brettshollenberger