title: Is it possible to stop router navigation based on some condition
body: <p>I'm new to angular, I want stop the routing when user clicks on <strong>refresh button</strong> or <strong>back button</strong> based on some condition. I don't know whether this is possible, if anybody knows help me</p>
  
  <pre><code>constructor(private route: Router) {
      this.route.events
          .filter(event =&gt; event instanceof NavigationEnd)
          .pairwise().subscribe((event) =&gt; {
              if (expression === true){
                  // stop routing 
              } else {
                  // continue routing
              }      
          });
  }
  </code></pre>
  
  <p>Can it be possible? If yes, how can I do this?</p>