If tab 2 is not shown, based on the condition, it is still visible, but selecting tab2 shows tab3’s content. Selecting tab3 shows a black screen above the tabs.
Is there a way to get this to work, or is this a bug in ionic?
I believe tabs operate largely on numeric indexes under the hood, which is probably what’s causing what you’re seeing. From a UX perspective, having tabs move around physically strikes me as problematic anyway, so I would go with disabling it instead of trying to nuke it out of the DOM anyway.
Thanks @rapropos. From a UX perspective, my app has 2 modes. When the user switches to the second mode, one of the tabs is no longer relevant and therefore I hide it. As a workaround, I just created a second tabs page, and switch between them when the mode changes.
For future reference, there’s actually the [show] attribute which works and is simple. I was struggling to find the solution only to see that I had already used the show attribute on another tab