lundi 4 avril 2016

$cordovaSQLite.execute run late

I'm making ionic app with cordova sqlite plugin.

but $cordovaSQLite.execute() function run late.

for example,

var set_info() { 
  console.log('before set_info'); 
  $cordovaSQLite.execute(db, query).then(function(res) { 
     //... 
    console.log('execute success'); 
  }, function(err) { 
     console.log(err); 
  }); 
  console.log('after set_info'); 
; 
set_info();

console showed like this:

before set_info

after set_info 

execute success

Anyone know about this issue?

Aucun commentaire:

Enregistrer un commentaire