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: \'/p
You can use the option "useHash" in RouterModule.forRoot().
RouterModule.forRoot(appRoutes, {useHash: true});
https://discuss.atom.io/t/angular-2-routes-breaking-on-electron-app-refresh/28370/4