hi guys,
I am having problem when I submit my form. The POST request is not working
status 204.The data is coming empty. this is my angular code:
angular.module('webappApp')
.controller('EbookregisterCtrl',['$scope','ebookService', function
($scope,ebookService) {
$scope.book = new ebookService();
$scope.save = function(book){
$scope.book.$save(book);
}
}]);
angular.module('webappApp')
.factory('ebookService', function ($resource) {
return $resource('../rest/book',{},{
list: {
method:'GET',
isArray:true
},
save:{
method:'POST'
}
});
});
<button type="submit" class="btn btn-success"
ng-controller="EbookregisterCtrl" ng-click="save(book)">Save</button>
any idea?
thanks.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.