title: ionic 4 prevent/disable device hardware backbutton
body: <p>I'm using angular routing(@angular/router) for ionic 4 project to disable the device back-button in ionic 4 prevent-default is not working below is my code in</p>
  
  <p>app.component.ts</p>
  
  <pre><code>    this.platform.backButton.subscribe(() =&gt; {
          if (this.router.url === '/Login') {
            this.util.presentAppExitAlert();
          } else {
            // event.preventDefault();
            console.log("invoing url ", this.router.url);
          }
        });
      });
  </code></pre>
  
  <p>i am not able to disable the device back-button any help here</p>