angularjs - Angular Pass Request Body to a Restful Interface -


my restful controller receiving null request body angular post , i'm not sure why.

here's code controller:

admincontroller.controller('modalctrl', ['$scope', '$modal', '$log', 'profile', 'availableprofiles',         function ($scope, $modal, $log, profile, availableprofiles) {     $scope.open = function (uuid, profile) {         var modalinstance = $modal.open({             animation: true,             templateurl: 'mymodalcontent.html',             controller: 'modalinstancectrl',             resolve: {                 profile: function () {                     return profile;                 },                 availableprofiles: function () {                     return availableprofiles;                 }             }         });         modalinstance.result.then(function () {             profile.save({uuid: uuid}, {profile: profile});         }, function () {});     }; }]);  

and here's code service:

adminservice.factory('profile', ['$resource',     function($resource, uuid, profile) {         return $resource(baseurl + 'candidate/:uuid/profile', {profile}, {             save: {method: 'post', params: {uuid: uuid}},         });     } ]); 

any thoughts on why profile object isn't being passed post?

call save on profile object.

modalinstance.result.then(function () {     profile.$save({uuid: uuid}); }, function () {}); 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -