Tab does not change when page mute

0

I'm on a page and when I click on a button I call an event, I want it to call another screen, they are calling but the tabs are not changing, it's still the same as the button.

Code that I'm using to call the page.

this.navCtrl.setPages([
        { page: AboutPage }
      ]);
    
asked by anonymous 12.07.2018 / 16:51

1 answer

1

Pass the index of the tab that will change as a parameter:

this.navCtrl.setPages([{page: AboutPage, tabIndex: 2}]);

At destination, get the tabIndex parameter and change the tab:

this.nav.parent.select(tabIndex);
    
12.07.2018 / 21:26