I developed an Ionic application, and I have several requests to PHP files, which return data. this works perfect. Now, when I want to recover a json file with $http.get
, I get the following error.
Failed to load http://www.xxxxxx.com/ea/json/categories.json:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'file://' is therefore not allowed access.
I add code to them, and I thank them for the help they can give me.
var armo = 'http://www.xxxxxx.com/ea/json/categories.json';
$http.get(armo).success(function(response) {
$scope.categories = response;
});