Show Local Database data on screen, Ionic

Asked

Viewed 508 times

3

The function that makes the select and roll the dice to result that’s the one:

$scope.queryAndUpdateOverview = function(){
  f_Select("SELECT * from cadastroPessoa",[],
          function(results){       
            $scope.dados = results;   
            console.log ($scope.dados)        
          });
}

After that I throw the dice to $scope.dados and in html I use a ng-repeat, but the data does not appear on the screen, but in the.log console they appear.

1 answer

1

Take a look at my answer on: /a/100066/8386

You need to let Angular know that the data has changed. This happens automatically in some predefined cases, such as when using Models (the Angular Watchers arrow by default), but it is not the case of a database query or other remote api.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.