Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,
i am learning Angularjs . i have a code:
controller.js
$scope.save = function (position) {
           $http.post(serviceBase + 'Positions', { model: $scope.position })
              .success(function (data) {
                            });

$scope.position already returns an object {Name: "Name",Description:"Description"{
In api:
[HttpPost]
public HttpResponseMessage Post(Position model)
{
}


But in api i can not get model . It's properties are null.
Pls help me in this code. Thanks.
I already have tried :
$http.post(serviceBase + 'Positions', $scope.position) 

But it is same.
Posted
Updated 8-Aug-15 9:37am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900