I have an app that has two pages and a tab set which has 4 pages. Here’s the break down:
- Loading/Prelogin Page
- Login Page
A. Tab 1
B. Tab 2
C. Tab 3
D. Tab 4
User enters the loading/prelogin screen. They then either login or are already logged in. From there they are sent to the tabs page.
User uses the apps within the tab context. Works fine.
User wants to log out. They they hit the logout button in tab4.
Redirected back to Login screen.
User logs in again. Now there are 2 sets of tabs. If I rinse and repeat. I’ll gain another tab… over and over.
What I’m doing is setting this.nav.setRoot(LoginPage). However, I’m already in the tabs so it keeps the previous tabs and when the new session starts I call this.nav.setRoot(TabsPage). Thus resulting in the stacking.
How can I reset the nav so I can completely get rid of them when I go back to the login screen?