I have a login page when start need to download some master data from http.post save to a sqllite Database
and then read the data store.
I have two functions DownloadData() and ReadData()
constructor(public toastCtrl: ToastController,private nav: NavController,public http: Http,private sqlite: SQLite, private auth: AuthmermaService, private alertCtrl: AlertController, private loadingCtrl: LoadingController) {
this. DownloadData();
this. ReadData();
}
I need to do the first function wait to all download and store in a sqllite database finish and then the second.
But httpPost is async and sqllite execute too so i dont have how to manage this.
Hope u can help me