Ionic version:
[x] 4.8.1
Current behavior:
When I use command this.router.navigateByUrl(url) or this.router.navigate([url]) component where I call this command destroyed with all rendered data
Expected behavior:
As before in ionic v3 I expect to save rendered data
Steps to reproduce:
call command from typescript: this.router.navigateByUrl(url)
P.S.: if I use <a routerLink="/discussion" (click)="openPost(post)">{{post.PostId}}</a>
I meant routerLink - then data saved
Related code:
this.router.navigateByUrl(url)
Other information:
this bug was already mentioned here:
https://github.com/ionic-team/ionic/issues/18942
Ionic info:
Component destroyed
Please answer something...
Thanks for the issue. Are you seeing page A get destroyed when navigating forward from page A to page B? Also, which version of Ionic are you seeing this on?
@liamdebeasi Yes, I see in logs that page A destroyed when navigating forward from page A to page B.
Ionic vervion 4.8.1 - it's written in the header of my issue.
Do I need to compose emulator with this bug to force resolving my problem or this issue is obviuos?
Thanks for the follow up. It would be great if you could provide a repo with the code required to reproduce this issue. Page A should not be getting destroyed as it's still in the navigation stack.
@liamdebeasi I cannot get how to post to codepen.io but I just made a rar archive with a test example project with "Sub-page" additional.
link to download example: https://olympapp.club/myapp.rar
This issue appears not every time.
To emulate this issue please:
P.S.: it could be a good idea to create standard example with actual ionic v4 on codepen so every user can modify it and attached modification example to bug issues here
Thanks for the follow up. I am doing the following steps:
ionic serve. This opens the app on tab 1.At this point, app-tab1, app-tab2, and app-sub-page all exist in the DOM. I am not seeing app-tab1 being removed from the DOM at all.
Can you clarify what I should be seeing?
@liamdebeasi please do exactly what is shown on screencapture
https://olympapp.club/ScreenRecorderProject1.mp4
Thank you! I was able to reproduce the issue.
For anyone else reading, here are the steps to reproduce (I was actually able to reproduce this in fewer steps):
The sub page should be added to the DOM, and the entire app-tabs component should be removed from DOM.
We will investigate this issue and will post here when we have more to share. Thanks!
@liamdebeasi thank you very much
@liamdebeasi It took a month and a half but the problem is not solved. Maybe I will solve it myself? Tell me what to do?
I haven't been able to take a look at this quite yet. Please feel free to take a look at the issue if you are interested -- we love community contributions!
You can follow this contributing guide for how to get started: https://github.com/ionic-team/ionic/blob/master/.github/CONTRIBUTING.md.
I will try to take a look soon, but otherwise let me know if you have any questions about the contributing guide 馃檪.
@liamdebeasi Ok, I will look at contributing guide. Anyway when I found out real reason I will text here back.
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.