in my controller.js I do like this
$http({
url: 'http://example.com/api.php',
method: "POST",
data: { 'YTParam' : 'test' }
})
.then(function(response) {
console.log(response.data);
},
function(response) { // optional
// failed
}
);
I even checked the network tool, the param did passed.
and in my api.php I try echo $_POST["YTParam"]
but in my console I see nothing? What's wrong here? I tried to echo "string", it did appeared..