前端
customer.controller("new_info",
function($scope, $routeParams,$http)
{
$scope.customer = {};
$scope.register = function () {
$http.post('localhost:4000/new_info', $scope.customer).then(
function (response) {
console.log("posted successfully");
}
);
}
});
后端
app.post('/new_info',(req,res)=>{ console.log(req.body); });