我正在尝试发帖,但下面似乎不起作用它没有发布但console.log()
看起来像一个放置请求,即
http://127.0.0.1/api/v1/participant?account=%7B%22pk%22:1%7D&email=someemail@gmail.com
工厂
app.factory('CbgenRestangular', function(Restangular) {
return Restangular.withConfig(function(RestangularConfigurer) {
RestangularConfigurer.setBaseUrl('http://127.0.0.1');
});
});
控制器
$scope.participant = {email :$scope.email, password: "", account:{pk:1}};
CbgenRestangular.all('api/v1/participant').post("participant", $scope.participant);
我做错了什么?