I have a modal in my Ionic 2 app. In this modal, clicking on a button, a confirmation prompt ("Are you sure?") pops up. By clicking yes, I do certain operations, then dismiss the modal by calling this method:
close() {
this._viewCtrl.dismiss();
}
and _viewCtrl is the property of my class, which i defined this way in the constructor:
constructor(
public _nav: NavController,
public _viewCtrl: ViewController,
public _profile: Profile,
params: NavParams) { ... }
My problem is that behind the modal I have a "3 Tabs Page", sort of. All works well, the 3 tabs are just fine, my modal is ok, it dismisses as it should, the problem is that when the modal is dismissed the 3 tabs break! They freeze on the second tab (which is the one that calls the modal)! Even if I click on tab 1 and 3, I see only the content for tab 2, and I can do nothing.
I'm pretty sure the operations before the dismiss shouldn't be a problem. I found that if I comment out the this.close(); part, and everything goes fine! The modal doesn't close, but I can close it by hand (with the same function, that's the strange thing!) then I return to the tabs page and the tabs are just fine.
What is happening to the app?
PS. No error is shown in the console!