Reputation: 8913
I like the benefits of the Angular 2 Router like Guards, Resolver, using navigateTo etc.
But in my app i dont want to change the route at all. So it should always stay "/" without changes in browser history. Is that possible?
Upvotes: 0
Views: 458
Reputation: 2885
It's possible, but in this case, you can't use routerLink
in your templates.
You can use instead user interaction within your app to trigger events (click)="announce(this)"
or (keyup)="execute(that)"
Put in your routing configuration :
{ path: '**', redirectTo: '' } //redirect all path to your home page
Some remarks about that:
Upvotes: 1