Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70927

Navigate to first tab on back button

$
0
0

Hi everybody,

I am currently building an app which has 3 different tabs. Let’s say ‘Home’, ‘Statistics’ and ‘Settings’.

I would like to change the “default navigation” system of the tabs a little.
Indeed, when clicking the back button in the tabs I would like to obtain the following behavior :

  1. Clicking on the back button in the ‘Home’ page will simply leave (exit) the app.
  2. Clicking on the back button in either the ‘Statistics’ page, or the ‘Settings’ page will always navigate directly back to the Home page. For better understanding, please look into the Android Twitter app.

Now for the first point listed above I have already managed to achieve it.

I have, however, not found a solution to the second point. I have read in the doc that, considering the underlying navigation stack behind each tab, it is bad practice to route from a tab to another tab. But does it mean the navigation behavior cannot be customed at all ?


I am willing to be told this is not a good navigation practice and to it differently. But having spent so much time trying to find a way, I am now genuinely interested to know if it is even possible.

Thanks in advance for any help !

EDIT: missing word, clarity

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>