Не отображается внутри окна консоли и вкладки сети - PullRequest
0 голосов
/ 30 августа 2018

Вторая часть - это HTML-код, а первая часть - это angularjs.

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"); //not showing anything in the console window
        }
    );
  }
});
<div class="col-md-6">
        <div class="panel-body">
            <form name="AddCustomer"  >
                <div class="form-group">
                    <label>Id</label>
                    <input type="text" class="form-control" ng-model="customer.id" />
                </div>
                <div class="form-group">
                    <label>Name</label>
                    <input type="text" class="form-control" ng-model="customer.name" />
                </div>
                <div class="form-group">
                    <label>City</label>
                    <input type="text" class="form-control" ng-model="customer.city" />
                </div>
                <button  class="btn btn-default" ng-click="register()">Submit</button> 
            </form>
        </div>
</div>
    

// после нажатия кнопки ничего не отображается.

...