I have a main tabs view started from the Tabs Starter template.
Inside one of those tab views I have an ion-items list.
When clicking on an item, I want to go to a tab child route passing an ID (eg. /tab/page/:id
).
That all works, BUT, I don’t have automatic page transitions and my ion-back-button
does not work, so I guess something is going wrong in the routing.
The docs are still Angular heavy so I’m not sure if I’m using the Vue routing correctly with Ionic.
The default Vue router options such as :to
are missing and an ion-item
only has href
(which I cannot use as this reloads te browser) and the button
attribute.
I also see a lot of router-link
usage, but in Ionic 5 that does not seem to be a part of ion-item
anymore.
After going through the forums, I found a solution by using @click="router.push('/tab/page/${id}'):
on my ion-item.
That correctly goes to the detail page, but as mentioned above, I don’t seem to be getting all the benefits from the router stack in Ionic.
Could somebody please give a basic example of the tabs starter template with a child route and a back button?