Hash Location Strategy in Angular 2
问题 I'm trying to create an application with hash location strategy, but it does not add the hash to the url. For instance when I click on a button associated with { path: '/polls', name: 'Polls', component: PollsComponent } it loads the page with this url : localhost:3000/polls. What do I have to change to get the hash location strategy? Why do I have to set the default base url if I want to use hash location strategy? This is the routing in the app.component.ts where all the routing is defined: