Я пытаюсь сделать запрос ajax в свое приложение node.js с помощью Angularjs, но я не могу получить данные на стороне сервера, то есть я не могу получить значение параметр "тест". вот мой код
app.post('/ajaxget',(reg,res)=>
{
console.log(reg.body.test);
res.send("ajaxtest");
})
и вот мой angularjs код
<div ng-app="myApp" ng-controller="customersCtrl">
<h1 style="color:red;"> {{x}} </h1>
</div>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
var test = 'hello';
$http.post('/ajaxget',test).then(function(response) {
$scope.x = response.data;
});
});