I am using SQLLite in Phonegap. First time once app is initialized, I am inserting all records in different tables and then use it on different pages.
On different pages i have opened database and getting data from the sqllite. But my issue is that sometimes on page it is not loading data from sqllite but as soon as i press app back button or app's back button it loads data.
Here is my code on different page on device ready. Will you please guide
var db;
$(document).ready(function(){
document.addEventListener("deviceready", getdata, false);
});
function getdata()
{
window.sqlitePlugin.openDatabase({name: "mayaa.db"});
}
Aucun commentaire:
Enregistrer un commentaire