var app1 = angular.module('myApp1', []);
app1.controller('myCtrl1', function($scope, $http) {
$scope.employees = [];
$scope.employeeForm = {
empId: 1,
empPoint: 1001,
empName: "lolik"
};
$scope.sendData = function () {
var method = "";
var url = "";
method = "POST";
url = '/userAdd';
$scope.employeeForm.empId+4;
console.log("POST");
$http({
method: method,
url: url,
data: angular.toJson($scope.employeeForm),
headers: {
'Content-Type': 'application/json'
}
}).then();
};
});
получаю null при отправке. что не так?