ничего не отображается на вкладке сети и console.log ("успешно опубликовано") - PullRequest
0 голосов
/ 30 августа 2018

Фронтальный

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");
        }
    );
  }
});

Back-end

 app.post('/new_info',(req,res)=>{ console.log(req.body); });
...