2014-07-22 34 views
18

Ben Restangular hizmetini kullanmaya çalışıyorum temiz tepki nesne olsun, ama ben çözemem bir problem aldık. Mesela ben bir özelliktir olabilir biliyorum ama benim temiz tepkisini :))Restangular POST isteği

this.Restangular.one("auth").post("login",data).then(function(resp){ 
       console.log(resp); 
       // in response object wrapped all Restangular methods 

      } 
gerekiyor, POST isteği yapıyorum ve temiz tepki Nesne almak istiyorum ama cevap Nesne tüm Restangular yöntemleri sarılmış
+0

ayakkabı bağı() metodu? – hutingung

cevap

30

Sen yanıtından .plain() kullanılarak düz eleman alabilirsiniz

Sen Restangular sürüm 1.4.0

Plunkr kullanmak gerekir

this.Restangular.one("auth").post("login",data).then(function(resp){ 
     console.log(resp.plain()); 
     //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) 
} 

- http://plnkr.co/edit/qDAyPqywC27in9wnlAHF