first Ill comment my config in server
i have a apache with my html page with angular in 80 port and other web server in port 4000 listening like a API
i am trying to make a $http request to my server but don't succes, just error message, this is my code
$http.post('http://localhost:4000/tareas', {msg:'asd'}).
success(function(data, status) {
alert('funciono');
}).
error(function(data, status) {
alert('error');
});
my server receive that request because i send a message when a controller is accesed, so the request connect with my API, but always execute the error my request in angular, even with $http.jsonp, that send me the error alert, my server return a simple json.
{data:'hurra.!', status:200}
i need a different response from my server to success?
even with F12 and neetwork, i see the request "canceled" with get and post, but my server send the message so i receive that request. with jsonp, chromium don't say a thin, everything is ok, but the $http.json still send me to error, is because my server response?
thanks to all.