Skip to content

Tab not marked as selected on initial route #575

@DepkaCZ

Description

@DepkaCZ

📚 What are you trying to do?

Hi,

according to docs you should set alias to / on the tab you wish to render instead of having index.vue in pages directory. That works fine as the tab gets rendered but the button in <ion-tab-bar> is not marked as selected. This doesn't work even in the modules playground project.

Does anyone know please how to fix that other than checking for route programatically and setting selected to true ?

🔍 What have you tried?

I've tried to change the href on <ion-tab-button> to / but that completely ruined the active tab detection. Furthermore, can some please explain to me how does it even work please ? Like ...when i set alias in define page meta on specific tab how does it know to render the parent component as well ? It's pretty unclear from the docs :(

ℹ️ Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions