in this piece of code the subscribe function executes after the last line in loadFromDB function:
loadFromDB(){
const loading = this.loadingCtrl.create({
content: 'pleas wait'
});
loading.present();
this.getInterviewFromDB()
.subscribe((data) => {
this.events = data;
console.log( 'before');
});
this.getMeetingsFromDB().subscribe((data)=>{
this.events.concat(data);
});
loading.dismiss();
console.log( 'after');
}
the loading is present and dismiss before loading any data from database and this is the output of the log
illustrates that line under the subscribe function Execute after the console.log inside it ...can any body explain to me .. ?!