Closed se-panfilov closed 11 years ago
Hey,
So, Restangular does add some functions and fields to every object you get, so that they're enhanced and you can actually keep on using Restangular for nested resources. That's part of the idea of using Restangular.
If you need the original object returned, you can do something like what's specified here https://github.com/mgonto/restangular/issues/100
Thanks!!
Restangular is a great library, but I think the choice of putting the returned object attributes at the same level of the "Restangular-related" methods is bad. The "workaround" is to copy (!!!) all the data.
Restangular 1.4.0 above provides now method called plain()
for getting plain response if needed.
Hi, i have a question about post queries. I am trying to send POST query to my backend, and catch the object in response. But returned object contain a lot of extra data. I just want get a pure object without anything else. Can you explain please what i doing wrong?
I'm do it like this:
Backend answer me with object:
I'm expected that returned object will displayed in console as is. But "signup" object contains much more fields, like:
There is my config:
P.S. i doubt now, "signup" object in .then(function (signup) { - is the returned object, or object that was sended to rest? So, anyway, how can i get returned object after post query?