Reputation: 599
When the user presses the browser's back button, but the active component's canDeactivate method returns false, the user will stay on the page. However, the url that is shown is the one the user tried to navigate to. How can I make so that the url stays the same? And also the history stays the same.
Upvotes: 1
Views: 1377
Reputation: 657967
This is a know issue and was fixed recently https://github.com/angular/angular/issues/10321
Update to the most recent version of Angular2 and the router should fix it.
Upvotes: 1