Relative routing in Ionic 4


#1

As per Mike Hartington’s suggestion on Github, I’ve moved my question here.

Ionic Ionic 4 beta.8, when I use relative routing to go from page A to page B like so:

openPageB(id) {
   this.router.navigate(['b', id], { relativeTo: this.route });
}

and then go back to page A (via the browser back button or an ion-back-button ), calling openPageB again does nothing. When I use absolute routes everything works normally.

I’ve created a repository to demonstrate the issue here: https://github.com/doender/routingError

Mike suggests that using relative routing here is incorrect. Could somebody explain why navigation succeeds the first time and why relative routing is used incorrectly in this case?


#2

Same problem here, this is not working and putting the base routes all the time is really not ideal.
I’ve come here after having reached the issue where you commented on github.
Did you open a new one?


#3

Did you get a solution for it yet?


#4

Same problem here, it’s quite frustrating…