У меня есть простой сервис Angular, который отлично работает в FireFox, Safari, Chrome и IE9+.
Однако для IE8 служба всегда выполняет обратный вызов .error.
JS:
myService.authUser($scope.data)
.success(function(data, status, headers, config) {
console.log("Success..");
$scope.showProfile = true;
})
.error(function (data, status, headers, config) {
console.log("ERRROR!!!");
$scope.errorText = true;
})
app.service('myService', function($http) {
this.authUser = function (myData) {
return $http({
url: 'url',
method: "POST",
data: angular.toJson(myData),
headers: {
'Content-Type': 'application/json'
}
});
};
});
В приведенном выше сценарии IE8 всегда регистрирует ОШИБКУ!!!