I have a back button in my application, which navigates relatively some levels back. In case of one level
this.router.navigate(['..'], { relativeTo: this.route });
it works perfectly (resulted route url:http://localhost:3000/three/two/one
). In case of two level back rel. navigation
this.router.navigate(['..', '..'], { relativeTo: this.route });
router navigates two levels back, BUT the resulted route url looks now like http://localhost:3000/three/two/
(tailing slash, which is not correct).
Am I doing something wrong or could it be a bug?
In case of two levels down use this:
this.router.navigate(['../../'], { relativeTo: this.route });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With