There is a controller:
betdeskApp.controller('regController', function ($scope, $http) { $scope.email = ''; $scope.password = ''; $scope.action = 'registration'; $scope.SendRequest = function() { $http.post(CreateHref($scope.action, $scope.email, $scope.password)).success(function (data) { $scope.regAnswer = data; console.log(data); }); } }); function CreateHref(action, email, password) { var str = "../model/web/index.php" + "?" + "action=" + action + "&" + "email=" + email + "&" + "password=" + password; // console.log(str); return str; } When sending this request, the answer comes in emptiness.
The server is php and works correctly.
Maybe I did not take into account something in the controller when requested?
Form submission code:
<form class="col-sm-6" action="../model/web/index.php" method="post"> <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> <input type="hidden" name="action" value="registration"> <input id="email" type="text" class="form-control" name="email" placeholder="Email" value="" ng-model="email"> </div><br /> <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span> <input id="password" type="password" class="form-control" name="password" placeholder="Password" value="" ng-model="password"> </div><br /> <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-repeat"></i></span> <input id="password" type="password" class="form-control" name="confirmPassword" placeholder="Confirm Password" ng-model="confPassword"> </div><br /> <div class="input-group"> <button type="submit" class="btn btn-primary">Submit</button> </div> </form> 
action, I register in the database, but when I send it via the controller, I don’t. In essence, I convey the same thing - Roman Timokhov