Electron reload not working
See original GitHub issueHi. First of all thanks for this great repository. Im pretty new working with Angular 4 so this problem may be because of that. The issue is that live reloading my app after changes in the code are done is not possible until i change app-routing.module.ts to this:
@NgModule({
imports: [RouterModule.forRoot(routes, {useHash: true})],
exports: [RouterModule]
})
Also i had to change index.html base href tag to be empty:
<base href="">
all this to tell angular to work with hashbang style routes instead of html5 style routes.
The solution came from here.
¿is this the right solution or i’m missing something?
Thanks in advance, gr33ts from Chile.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:17
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Electron App -- Electron reload not working - Stack Overflow
reload to work on my window's Browserview. They perfectly work on the main body of the browser window, but the browser view that...
Read more >How can I do refresh in electron html app #11895 - GitHub
How can I do refresh in electron html app ? I have window without menu and I wan to let user to refresh...
Read more >electron-reload - npm
Simplest way to reload an electron app on file changes!. Latest version: 2.0.0-alpha.1, last published: a year ago.
Read more >Hot Reload in ElectronJS - GeeksforGeeks
This tutorial will demonstrate how to implement hot reloading in Electron using electron-reload npm package and electron-reloader npm package.
Read more >electron-reload - npm Package Health Analysis - Snyk
The npm package electron-reload was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For people who still have this issue, do a force app load if failed:
The change to
<base href=''>
actually breaks reloading right now for routing withoutuseHash=true
.It adds to every URL an extra backslash which cannot be resolved by the router e.g. it goes from “file” to “file/” which is quite annoying and it is hard to find out why this is happening.
I checked with electron and the reload seems to work for hashing and without it with the
<base href='/'>
at least for angular 9Since the latest version of this repo is supporting angular 9, would it be possible to change the base element back, since there is no need for the
href=''
anymore and it only will provide confusion for future users who also do not want to use hashing.