New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Lifecycle hook not firing when going to non tabs page and coming back. #29171
Comments
Thanks for the issue! This issue has been labeled as Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed. If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue. For a guide on how to create a good reproduction, see our Contributing Guide. |
Hi there, Please attach a new reproduction. The issue you linked to references a previously resolved Vue fix. The Vue and Angular routing implementation are different, so we'll need a new reproduction to verify. |
here is the github repo: |
Thanks for providing a repo. Ionic is working as intended here, though I realize the behavior is a bit confusing. When you go from a tabs page to a non-tabs page, the entire tabs context is considered "leaving". However within the tabs context itself, Tab 1 is still active which is why the lifecycles are not firing on Tab 1 when going to a non-tabs page. You can test this by logging something in the As I noted, this is a bit confusing and we are looking to improve this behavior. Ideally I posted a workaround in #28078 (comment) that might be of interest to you too. |
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. |
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
When going to non tabs page and then coming back Lyfecycle function not firing.
Expected Behavior
it should fire when ever coming to tabs page.
Steps to Reproduce
Check this repo:
#25784
Code Reproduction URL
#25784
Ionic Info
Additional Information
I am using Angular 17, and latest ionic.
This is the exact issue i am facing:
#25784
The text was updated successfully, but these errors were encountered: