How to close modal contain tabs?


#1

generate tabs from cli

tab.html
<ion-tabs> <ion-tab [root]="tab1Root" tabTitle="tab1"></ion-tab> <ion-tab [root]="tab2Root" tabTitle="tab2"></ion-tab> </ion-tabs>

show modal
this.nav.present(Modal.create(TabPage));

on tab1 i have a button to close modal
this.viewCtrl.dismiss();

but it still showing, it not show any error in web console
sorry for my english.


#2

each tab has its own history stack --> if you call dismiss in first tab1 your viewctrl is the tab not the Modal view controller.


#3

thank you, you are right


#4

So in this case, how can I close that modal from tab1??