I'm having a problem. I'm trying to make a $http call with the .then function insted .sucssess and .error. But although i change the url of the request to a non existing one, it is always executing the succes handler:
$http.get('data/myjson.json').then(onSuccess, onError);
onSuccess(data){};
onError(data){};
Also, the data parameter has a status of 404, indicating the failure, but the onError got never execute.
some body can explain how this really work?
thanks!