Changing page of tab dynamically requires a physical click

I have a tab that i assign 2 different pages two depending on some user action, however if i dynamically change the root page of a tab and select it, it does select the right tab but the content is not refreshed with the new page, i have to physically click the tab button AGAIN in order for it to update the content.

It seems i need to force a “click” event of a tab

here is my code

    var homeTab = navCtrl.parent.getByIndex(0);
    homeTab.root = HomePlacePage;
    navCtrl.parent.select(0);

Hi there.
Can you please put this in some sort of demo?
I’m not sure I’m quite following the issue.

posted the demo in github under the posted issue

Could you post it here?
There might not be an issue, but rather some code that just needs to be changed a bit.

change the png to ZIP, some reason it didnt let me copy the zip

Got access denied.

If it’s a git repo, just post the link to that in stead

try this https://ufile.io/50ca5

Hi,
I also tried to change te page of a tab dynamically using this code:

`Preformatted text`ionViewWillEnter() {
    this.storage.ready().then(() => {
      this.storage.get('diaryView').then((value) => {
        switch(value) {
          case "0":
            this.diaryTab = Diary0Page;
            break;
          case "1":
            this.diaryTab = Diary1Page;
            break;
          case "2":
            this.diaryTab = Diary2Page;
            break;
          default:
            this.diaryTab = Diary0Page;
        }
      })
    }) 
  }`Preformatted text`

The selected page loads only after clicking on the icon/text of the tab.

i uploaded the code, did u have a chance to look at it?

Hey Zoinky,
Did you find the solution for this topic?