When I use $http.get
my code works, but if I use $http.post, I never get the parameters to the request .php file.
This is Service function:
What if you specify the content-type in the headers, specifically like this:
$http({
method: 'POST',
url: '/data/AJAXRequest.php',
data: { mydata: 1, abcd: 2 },
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
}).success(....);
Found comments relating to PHP specifically from this question: AngularJs $http.post() does not send data
It would seem that Angular sends as application/json by default, which can confuse PHP.