I'm trying to send form data on angular js to php page. bu it's not working. here's my form:
and this is my $http request
nodes.controller("addNew",function($http){
var content = this;
this.submitNew = function(type)
{
//content.body.filter
$http({method:'POST',url:http+'nodes/create',
data:{
title:content.title,
author:content.author,
node_author:content.node_author,
body:content.body,
type:type
},
headers:{
"Access-Control-Allow-Methods":"POST",
'Content-Type': 'application/x-www-form-urlencoded',
'Access-Control-Allow-Origin':'*',
"Access-Control-Allow-Headers": "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"
}
}
);
this.title = '';
this.author = '';
this.body = '';
}
});
this error!!!
XMLHttpRequest cannot load http://hangoma.lc/nodes/create. Request header field Access-Control-Allow-Origin is not allowed by Access-Control-Allow-Headers
header details
Remote Address:127.0.0.1:80
Request URL:http://hangoma.lc/nodes/create
Request Method:OPTIONS
Status Code:200 OK
Please help!!! i cannot find solution.