Restangular get clean response object from POST request


I’m trying to use Restangular service, but I have gotten one problem which I can’t solve. For example I’m doing the POST request and I want to get clean response Object, but in my response Object wrapped all Restangular methods, I know may be it’s a feature, but I need my clean response :))"auth").post("login",data).then(function(resp){
                // in response object wrapped all Restangular methods 



You can get the plain element using .plain() from response"auth").post("login",data).then(function(resp){
      //Returns the plain element received from the server without 
      //any of the enhanced methods from Restangular. 
     //It's an alias to calling Restangular.stripRestangular(elem)

You need to use Restangular version 1.4.0

Plunkr –

Answered By – hutingung

Answer Checked By – Marilyn (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.