java-angular-web-app
java-angular-web-app copied to clipboard
Routing single page app with file protocol for electron and cordova
The routing fails because the final '/#' is not redirect to index.html in the file protocol. Reproduce it in electron-client project clicking after npm start on Stats tab
The error is caused by source code of front end app in app.routing.ts:
path: '',
redirectTo: 'dashboard',
pathMatch: 'full',
clicking on element with '#' element. For example:
<a class="nav-link" href="#pablo">
The problem is that with the protocol file the blank space before '#' is not replaced with 'dashboard'. In fact the correct link should be:
<a class="nav-link" href="dashboard#pablo">