İyonik kullanarak bir uygulama oluşturmaya çalışıyorum. Ben "Bu tarayıcılarda iyi çalışıyor amaÇapraz Kaynak Talebi POST ile Engellendi Ancak Tarayıcıda req ile çalışıyor ancak cihaz çalışmıyor
.. cihaz i yorgun
var link = API_END_POINT + Bu yöntemi kullanarak değil bile bu kodu
var req =
{
method: 'POST',
url: API_END_POINT + "/accounts/login",
data: this.toparams(myobject),
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
}
$http(req).
success(function(data, status, headers, config)
{
if(data.result = 'success') {
console.log('Success', data);
deferred.resolve(data);
} else {
deferred.resolve(0);
}
}).
error(function(data, status, headers, config)
{
console.error('ERR');
deferred.resolve(0);
});
return deferred.promise;
}
kullanıyorum/accounts/login ";
$http.post(link, {username : $scope.data.username,password:$scope.data.password}).then(function (res){
$scope.response = res;
});
Bu, tarayıcıda CORS hatası veriyor.
Herhangi bir fikrin var mı?
Teşekkür
tarayıcıda test ediyoruz, hem ajax arama sayfası ve API son nokta olan aynı alana sahip, örneğin http: // localhost: 8080? – shakib
no. Bu, CORS sorunu ise –