From my backend server, i couldn't get data from $_post from ionic angular post.
Below is my code:
$scope.formData = {};
$scope.processForm = function(){
$http({
type: 'POST',
url: 'http://domain/contact',
dataType: 'jsonp',
headers: {
'Content-Type': "application/x-www-form-urlencoded"
},
data: {
_method: 'POST',
name: $scope.formData.name,
email: $scope.formData.email,
subject: $scope.formData.subject,
message: $scope.formData.message
} //pass data as string
})
.success(function(data){
//callback
});
};
variables: name, email, subject and email couldnt be passed to backend.