Access to prestashop API by Ionic (AngularJS) denied

I want to get my data in JSON from my Prestashop API with this code.

$http.get("").success(function (data, status, headers, config) {
  $scope.success = "success";
  $scope.categoriesId =;
}).error(function (data, status, headers, config) {
  $scope.success = "fail";

But when I try to display my result in the following view I only get “fail”.

    <ion-item ng-repeat="Id in categoriesId" href="#/app/categories/{{Id}}">

In the browser’s console I have a “Error: Access to restricted URI denied”.

But if I try to access the data through the browser with the URL used in my code, that works.

What should I do to make it work ?

how manage connection online and offline?when open the app