I have a tab page A B C
when I click B It display list of item D I click D and this go to page D
then I click icon C in a tab and click icon B again. It will display page D not page B.
Is there anyway to reset page when I change tab
I use ionic 2 RC
I have a tab page A B C
I’ve faced the same problem and am searching for solution now…
Have you done it yet?
Pls share your solution if you did it. tks
In my case, finally in the
<ion-tab-button> for Ionic 5, I had to combine tab with routerLink and it works perfectly for me: The reason? I don’t know hehe! But I found no other way without using the eventHandler, navController and without handling lifecycle:
<ion-tab-button class="dashboard__button" tab="beneficiaries" routerLink="/dashboard/beneficiaries">
So every time you exit and return, it will always be for the root page.
If there is an optimal alternative, please confirm.
As a user, I would absolutely hate this. If I leave a tab, do some other things, and then come back, I fully expect everything to be just as I left it in the old tab world.
@rapropos You aren’t far from the truth and I also share your opinion. However, there are sometimes business needs that do not always go hand in hand with the user experience.
Therefore, they are scenarios that should be covered yes or yes, and more so when the open Page must disappear the tabs below.
When I am faced with situations like this, I frame things by giving clients two or three options, any of which I would be comfortable implementing. It would probably help to know more about the overall app layout and design, but in general, I would offer:
- abandon the idea of remote action at a distance, and stick with tabs for overall organization, or
- don’t use tabs
Tabs are, frankly, way overused in mobile apps, IMHO. A “global reset” sort of feature strikes me as a good fit for a sidemenu option or a dedicated toolbar button. Either way, something that is consistently present and requiring the same action to activate, not something contextual like a tab or an element in a page that is a child of a tab.
@rapropos Apparently, the additional clarification has planned to share with you about one case was not posted.
In this case, the project already had a design problem because it used “pages” instead of a “Modal” that loads components. However, since the use of pages was preserved, this “hacking” (so to speak) was used to simulate the scenario of covering tabs.
Something similar to the Udemy App -> Account> Account Security.
And thanks for your advice, it was very valuable.