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?
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?
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: