[Question| Error parsing data with json file


#1

I’m new learning ionic + angularjs (about three days ago), and this time i have a trobule getting json data from a webpage, so if anybody can give me a hand with my code i will appreciate.

  $scope.doSearch = ionic.debounce(function(query,page) {
$scope.hide();
$http.get('http://page.com/pages/api.php',{params: {q: query, p: page}}).then(function(resp){
  if(resp.data.count > 0)
    {$scope.misdatos = resp.data.items;}
  else
    {$scope.error = '<div class="message padding">No hay ningún resultado...</div>'}
}, function(err){
      $scope.showAlert('Ocurrió un error al realizar la búsqueda. Comprueba tu conexión a internet!', 'Error al buscar!');  
});}, 500);

Thank you so much!!