현재 외부 API에서 가져 오는 Ionic App을 개발 중입니다. 이 API는 나 자신도 개발했기 때문에 모든 것이 로컬입니다. API는 JSON 배열을 반환합니다.이오니아 오류 가져 오기 로컬 API
나의 현재 컨트롤러는 다음과 같습니다 :
app.controller('ListController', ['$scope', '$http', function($scope, $http){
$http.get('http://localhost:8080/api/getPoi/merzouga').success(function(data){
$scope.pois = data;
});
}]);
문제는 내가보기에이를로드하려고 할 때 다음과 같은 오류 얻을 수 있습니다 :
XMLHttpRequest cannot load http://localhost:8080/api/getPoi/merzouga. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.
을 내가 알고하지 않습니다 그것은 관련이지만, 이온 포트 8100에 제공되고 있으며,에 8080
어떤 생각에 API가 어떻게 로컬에서 테스트 할 수 있습니다?