Reputation: 1267
Here is my apps home page url: http://localhost:4200/
Whenever the user selects a next button a new screen loads with a new url similar to the examples shown below:
http://localhost:4200/screen/static/text/1/0
http://localhost:4200/screen/activity/click-and-reveal/1/1
http://localhost:4200/screen/activity/click-and-reveal/3/2
and so on
I would really like the url to display a single value something like http://MyProjectName ..... as i think it looks rather unprofessional to have the url looking the way it is looking currently.
Any help as to how i could accomplish this would be greatly appreciated :).
Upvotes: 1
Views: 155
Reputation: 14109
The URL won't change if you use the navigation option SkipLocationChange on your links.
<a routerLink="/somePath" skipLocationChange>Settings</a>
Or in code behind:
this.router.navigate(['/somePath'], { skipLocationChange: true });
Upvotes: 1