Ionic v4: Change active tab dynamically

#1

Hello everyone. Require your help. I am using Ionic V4 to develop an app. It has a tabs page with four tabs in it. I have a button in Tab1 and on click it should change the tab to second tab.
Sorry if i was not clear but please help me.

#2

Have you tried changing the url via NavController of the Angular Router?

#3

Thanks for the revert.
Yes i have did that

this.router.navigateByUrl(“favourites”);

But in this way, the page is being opened as a new page instead of changing as tab.

1 Like
#4

Thanks. Got it working.

Changed to:

`

this.router.navigateByUrl(“tabs/favourites”);

`