title: NativeScript & Angular - How to clear the router history?
body: <p>I am working on a NativeScript 6 project with Angular 8.</p>
  
  <p>I want to clear the router history after the user logs in.</p>
  
  <p>This is what I've tried:</p>
  
  <p>public onLogin() {</p>
  
  <pre><code>this.registerUserCredentialsService
      .registerUserCredentials(this.username, this.password)
      .then(() =&gt; {
          this.router.navigate(['home-page'], { clearHistory: true });
      });
  </code></pre>
  
  <p>}</p>
  
  <p>I keep getting this error:</p>
  
  <pre><code>ERROR in src/app/register-user-credentials.component.ts(33,55): error TS2345: Argument of type '{ clearHistory: boolean; }' is not assignable to parameter of type 'NavigationExtras'.
    Object literal may only specify known properties, and 'clearHistory' does not exist in type 'NavigationExtras'.
  How can I clear the router history?
  </code></pre>