I am trying to navigate users to tab 3 then on top of tab 3 I am trying to push a view. so the result is : i can navigate to tab 3 but the view is not pushed on top of tab 3, instead when i go to the “first tab” i see the view that was supposed to be pushed on top of tab 3. I thought the push is getting executed before the tab is being navigated to and i tried setting timeout. still doesnt help. Someone please help. here is the code i tried:
FCMPlugin.onNotification((data)=>{
if(data.wasTapped){
if(data.type == "urgentnews"){
let loading = this.loadingCtrl.create({
content:'loading..'
});
loading.present();
this.tab.select(2);
setTimeout(()=>{
this.navCtrl.push(ViewurgentnewsPage);
this.navCtrl.push(ViewurgentnewsdetailPage,{data});
loading.dismiss();
},3000)
}
}else{
//alert('this was received on foreground');
}
});