title: How to cancel route change in Angular 2?
body: <p>I would like to cancel the route change when the user click back or forward button in the browser.
  So far I manage to capture the route change event as in the code below:</p>
  
  <pre><code>constructor(router:Router) {
    router.events
      .subscribe((event:Event) =&gt; {
        // some logic.
        // event.preventDefault(); ?
      });
  }
  </code></pre>
  
  <p>I couldn't find any method / member in event to stop the event default. Then I will get this error on console because I have no route config registered as intended, this is because I use <code>location.go()</code> to modify the url.</p>
  
  <blockquote>
    <p>Error: Uncaught (in promise): Error: Cannot match any routes: 'Some/Url'</p>
  </blockquote>
  
  <p>Is there any way to cancel the route change so Angular doesn't look at the route config?</p>