-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
PRO doesn't clear all outlets correctly #2303
Comments
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug
We use a PRO / nested PRO with tabview setup and when we navigate with clearHistory in one of the tabs, of all pages on the backStack in that PRO the ngOnDestroy is not called until the app is shut down. ngOnDestroy is called successfully on backbutton. After investigation we found out that not every navigation (a.k.a routeReuseStrategy.store) in a tab outlet is stored under the same outletKey, resulting in multiple outlet keys, but loadComponentInPage only clears the first outletKey.
To Reproduce
Setup an angular app with a tabview, add a few navigations in a single tab with the last one a clearHistory: true, add logging to ngOnDestroy of every page. Check to see that not all ngOnDestroys have been called.
Expected behavior
Every ngOnDestroy of every destroyed page should be called.
Sample project
Additional context
We often subscribe/unsubscribe in ngOnInit/ngOnDestroy in pages, so this leads to memory leaks and observable leaks for us.
The text was updated successfully, but these errors were encountered: