i have a peculiar situation in Angular 2.0 with routing
I don't want to repeat a navigation. i.e if a user goes to page a -> then goes to page b-> then again goes to page a-> then goes to page c and when the user presses back button, the user should be redirected to page b and not page a. What i want to achieve is Pressing the back button multiple times should not display the same page more than once. So if i do a>b>c>a>c>b>a>c>b>a and then start pressing back : pages a,b,c should come only once & not based on regular browser behavior.
On successful login, if i press back button, the login screen shouldn't come, rather it should exit or something like a blank URL and not the login URL.
Any suggestions how to implement this ?
Should i use NavigationStart/NavigationEnd
& write my logic there ?
I solved the following by writting my own LocationStrategy
And in my app.module.ts
This way i was able to achieve my requirements.