Angular Js Demo Code :-
angular.module('ModuleName',[]).controller('main', ['$http', function($http){
var formData = { password: 'test pwd', email : 'test email' };
var postData = 'myData='+JSON.stringify(formData);
$http({
method : 'POST',
url : 'resources/curl.php',
data: postData,
headers : {'Content-Type': 'application/x-www-form-urlencoded'}
}).success(function(res){
console.log(res);
}).error(function(error){
console.log(error);
});
}]);
Server Side Code :-
<?php
// it will print whole json string, which you access after json_decocde in php
$myData = json_decode($_POST['myData']);
print_r($myData);
?>
Due to angular behaviour there is no direct method for normal post behaviour at PHP server, so you have to manage it in json objects.