我们试图将sql字符串转换为雄辩的格式,但无法正常工作。请任何人帮助我
this.login = function (data) {
var loginResults = Restangular.one('/persons/login')
.post(undefined, data, {
include: "user"
})
.then(function (data) {
var mytoken = data.id;
storeToken(data);
Restangular.setDefaultHeaders({ accept: 'application/json', access_token: mytoken });
$state.go('home');
}, function (Response) {
console.log("There was an error.");
alert("Login Failed");
});
return loginResults;
}