Open slvrtrn opened 9 years ago
+1 Plain method should just remove Restangular fields.
Has this issue been fixed?
This is still happening. This is a lot worse, for instance, if you have a resource which actually has some field left undefined in the server, then you change it and need to send it as incapsulated obj in another request, since you have to strip restangular fields but you cannot invoke plain apparently
Also, to clarify: that happens even if you add the field anywhere else in your application code, not just the interceptor
Also if I changed the value somewhere (i.e. in an ngModel 2-way binding), the plain will return the old value actually
Hello. I'm trying to store some pagination information in
$pagination
field of my data object using addResponseInterceptorCode example:
in my service i'm using
plain()
methods to strip out restangular fieldsand after
plain()
method call custom$pagination
field is removed. Is it possible to add an exception for some fields without workarounds like:?
Thanks in advance.