I'm facing a issues about using routerLink with Angular with Electron.
<a routerLink="/example">Page Example</a>
When this link is clicked, I have a blank page with this error in DevTools :
file:///< path >/dist/example failed net:ERR_FILE_NOT_FOUND
Thing I already try :
- Set
--base-hrefto./or/or empty - Add
{ useHash: true }inRouterModule.forRoot() - Changed from
<a routerLink="/example">Page Example</a>to :routerLink="#/example", orrouterLink="/#/example"orrouterLink="index.html/example"orrouterLink="index.html#/example"
Linked issues : When I use window.location.reload(), it give the same problem
Infos :
- Angular version : 9
- Electron version : 13