I'm using Ionic 4 with Angular. I have this page that, only on certain conditions that I managed to reproduce, behaves weirdly when going back to previous page.
If I callthis.navCtrl.pop(); it goes back to the main page instead of the previous one, if I call this.navCtrl.back(); it goes back to the previous page, but calls its contructor again and the router doesn't have the initial extras anymore, so it's impossible to really initialize the page again.
Basically, if we name the pages A, B, C etc the flow that always produces this issue is:
A(main page) -> B -> C -> D -> B , this is where I press back and expect D back.
A working flow:
A -> C -> D -> B, then back
Even if I chain the 2 of them, but start with the working one, everything is fine.
What am I doing wrong? Or is it a bug?