0

Front-end

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); });
raina77ow
  • 103,633
  • 15
  • 192
  • 229

0 Answers0