It’s been a few years since I’ve touched and it’s much different. While I appreciate that they now try to use the angular router, there doesn’t seem to be any documentation on how it works now.
I want ion-back-button to work on iOS, so users can navigate back. There is no documentation to explain how this is supposed to work, it simply says
It is smart enough to know what to render based on the mode and when to show based on the navigation stack
Which doesn’t seem too helpful.
But, I made my settings page (/settings) navigate to a sub profile page (/settings/profile) using
This takes me to the profile page, and the back button even appears, it just doesn’t actually do anything. Turns out it is not “smart enough to know what to render”, because it does nothing.
I looked at the routing section in the angular guide and looked at the docs for router-output, I see nothing that tells me what is going on here. I also tried using defaultHref just to see and it makes no difference, the button simply doesn’t work.
I can force it to go back with
this.location.back();, but I lose the animation when going back, and sort of seems to defeat the purpose of having a back button if I have to hard code the functionality each time.