I am trying to save data from angularjs sending it to an api but i have the error 500 internal server error. the controller is an array hols the scops coming from the html page.
Your function on the controller expects an object, but you are trying to post an array. Change it as follows,
$scope.setup = {
"Spec_Code": $scope.spec, "Medical_CTG": $scope.deg, "Doctor_Code": $scope.st, "Main_Serv": $scope.stypecode, "Serv_Group": $scope.sgroupcode, "Sub_Serv": $scope.sub,
"Pat_Type": $scope.patype, "Calc_Type": $scope.calcs, "Calc_From": $scope.rfrom, "Calc_Val": $scope.calcvalue, "STAFF_TYPE": $scope.stafftype,
"pricelist": $scope.selectedpricelist
});
also convert to string before posting it using JSON.stringify($scope.setup);