Change tabs highlight dynamically


#1

Hi folks,

Here’s my scenario - when a user clicks on a notification outside the app, the app opens and navigates to an About us page that contains ion-slides and has its own tab. In the navparams of the service that handles the notification I pass the slide number (4) that the About Us page should show when it loads, and I use the slideTo method of the slides object to go there, using the ionViewDidEnter hook:

this.slideRedirect = this.navParams.get(‘slide’);

ionViewDidEnter() {
if(this.slideRedirect != undefined){
this.slides.slideTo(this.slideRedirect);
}
}

However the active tab highlight doesn’t change when it hits that page - it remains on Home. I can update the tabs to highlight the About Us using Tabs and tabs.select, but then it reloads the About Us page and shows the first slide.

Any thoughts on how to make the Tabs update without the click event, or change the slide or tabs dynamically?

thanks

Devin


#2

There are several options described under “Selecting a Tab” in the docs. How is that different from what you are seeking?