i have setup my route links like this
http://localhost:4200/#/nav/matches
http://localhost:4200/#/nav/my-profile
http://localhost:4200/#/nav/edit-profile
http://localhost:4200/#/nav/my-photos
http://localhost:4200/#/nav/settings
http://localhost:4200/#/nav/my-orders
the problem iam facing is whenever i clicks the hardware back button after navigation through all these pages
app exits to goole default screen or some other url i searched before (like https://stackoverflow.com/) some times it comes to matches screen which is my default screen and exits ( navigating away from my site )
i want to go back to previous page of my application instead of exiting directly like
5 ==> 4==> 3 ==> 2 ==> 1 ==> exit
The unexpected behaviour is because in my project to navigate to another routes we were using
this.router.navigateByUrl(link, {replaceUrl: true});
this replaces history thanks to Angular 2 - replace history instead of pushing
then i changed that to
this.router.navigateByUrl(link);
and the issue fixed