Closed pleerock closed 8 years ago
Hey,
Thanks for the report, I do think it makes sense :).
I'll mark it as an enhancement :).
Cheers!
+1
Is plain() supposed to return $$hashKey??
:+1:
Would really like this, caused me a ton of confusion. One particular issue is that my getList was returning a post property that was overridden by Restangular's post property.
Agreed. I have tons of plain()'s littering my code.
+1
+2
+1
+1
It could have a feature to only use it in certainly moments, like posting to the server.
+1
+1
+1
:+1:
I've been (minimally) using this library for 6+ months without realizing the 'big idea' of 'restangularization', which is a very cool idea but surprises you when you look at your $http response and it has all these restangular properties bundled in.
I think that fact should be mentioned in a "Critical/Minimum understanding" section of the README, not because the way it works by default is "wrong", but because people like me will miss out on perhaps the coolest part of the project.
I think that in a MVC application (where there should be a service class responsible for making the CRUD) the "retangularization" doesn't help, instead it creates problems clobbering properties and making debugging more difficult.
I suggest that the "restangularization" should be an option that, If turned off, the object should be clean as it come from the server (without any clobbered properties nor additional methods).
+1
+1
Would be especially useful when having a bunch of conditions on object size sent from server, currently needs a plain()
for each of them.
+1
Restangular is wonderful but in most of the cases we don't need all the methods. A raw response without unnecessary methods additions will be a very appreciated feature.
+1
+1
:+1:
:100:
+1
This is addressed in this PR #1184
Would be cool to have this merged as soon as possible.
+1
Merged. Will be in a release shortly.
@daviesgeek Any chance of the new release?
I like restangular, but there are some features I dislike. I don't like that restangular appends its own methods to the objects and arrays(!). I know this is one of the principle of restangular, but personally I don't think that its a RIGHT principle.
I like new
plain()
method you've introduced, but I also would like to see the option to configure it to use it by default, e.g.getList
,get
methods return promise that will contain already a plain object.