I'm trying to make a post but below does not appear to work it does not post but console.log() looks like a put request i.e
http://127.0.0.1/api/v1/participant?account=%7B%22pk%22:1%7D&[email protected]
factory
app.factory('CbgenRestangular', function(Restangular) {
return Restangular.withConfig(function(RestangularConfigurer) {
RestangularConfigurer.setBaseUrl('http://127.0.0.1');
});
});
controller
$scope.participant = {email :$scope.email, password: "", account:{pk:1}};
CbgenRestangular.all('api/v1/participant').post("participant", $scope.participant);
What I'm I doing wrong?