Could anyone tell me why the following statement does not send the post data to the designated url? The url is called but on the server when I print $_POST - I get an empty
Add this in your js file:
$http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded";
and add this to your server file:
$params = json_decode(file_get_contents('php://input'), true);
That should work.