You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
I have an empty tabs template project and I've added a settings page outside of tabs.
When I navigate between tabs, lifecycle methods ionViewWillEnter and ionViewWillLeave are called appropriately on each specific tab page (e.g. '/tabs/tab1', '/tabs/tab2', ...).
But when I move to external page (e.g. '/settings') lifecycle methods are not called on the specific tab page, only on the parent TabsPage.
Expected behavior:
Navigating from '/tabs/tab1' to '/settings' would invoke ionViewWillLeave on Tab1Page and navigating back would again invoke ionViewWillEnter on Tab1Page.
Steps to reproduce:
Run the demo app than navigate to settings and back to tabs. Compare console log to the one when switching between tabs.
[Tab1Page] enter
[TabsPage] enter
[Tab1Page] leave
[Tab2Page] enter
[Tab2Page] leave
[Tab1Page] enter
[TabsPage] leave
<-- missing [Tab1Page] leave
[SettingsPage] enter
[SettingsPage] leave
[TabsPage] enter
<-- missing [Tab1Page] enter
When entering and leaving settings page, no events are invoked on Tabs1Page (last active specific tab page).
Other information:
This behaviour is very problematic in case of user sign out - I want to redirect user to "/login" when signing out, but then I want to reload user data after logging back in and navigating to tabs.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Bug Report
Ionic version:
[x] 4.x
Current behavior:
I have an empty tabs template project and I've added a settings page outside of tabs.
When I navigate between tabs, lifecycle methods ionViewWillEnter and ionViewWillLeave are called appropriately on each specific tab page (e.g. '/tabs/tab1', '/tabs/tab2', ...).
But when I move to external page (e.g. '/settings') lifecycle methods are not called on the specific tab page, only on the parent TabsPage.
Expected behavior:
Navigating from '/tabs/tab1' to '/settings' would invoke ionViewWillLeave on Tab1Page and navigating back would again invoke ionViewWillEnter on Tab1Page.
Steps to reproduce:
Run the demo app than navigate to settings and back to tabs. Compare console log to the one when switching between tabs.
Related code:
https://github.com/gregor-srdic/ionic4-ionviewwillenter-tabs-bug
When entering and leaving settings page, no events are invoked on Tabs1Page (last active specific tab page).
Other information:
This behaviour is very problematic in case of user sign out - I want to redirect user to "/login" when signing out, but then I want to reload user data after logging back in and navigating to tabs.
Ionic info:
The text was updated successfully, but these errors were encountered: