Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229646

SQLite Db Sync call back

$
0
0

Because its asynchronous code. You need to put your code in the block of callback if you want waiting until finish

sql = "select * from muser" ;
 db.executeSql(sql,{})
      .then((data) => {
           console.log("Got data from DB");
Http.post(url, data);  // here send your data to your server. 
       })
      .catch(e => console.log(e))

Viewing all articles
Browse latest Browse all 229646

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>