Hiding routes on url Angular 2+

前端 未结 1 1257
一整个雨季
一整个雨季 2021-01-13 02:54

So I am trying to hide my routes on the url, that means i want my app to show always the url as being in the root app, for example:

\"www.foo.com\"

相关标签:
1条回答
  • 2021-01-13 03:24

    What you are looking for is Angulars skipLocationChange, this is what Angular refers to as "NavigationExtras". Here is the documentation: Angular docs on NavExtras

    // Navigate silently to /view
    this.router.navigate(['/view'], { skipLocationChange: true });
    
    0 讨论(0)
提交回复
热议问题