Build Angular Desktop Apps With Electron (QuickStart)
Check the blog post to re-create this sample from scratch, step by step.
Run in electron using a local file (without hot code reload support)
npm run electron-buildto build the project and run the application inside electron platform.
Run in electron using a local dev server (WITH hot code reload support)
- Uncomment the code
mainWindow.loadURL('http://localhost:4200');in the file
main.jsand comment out
npm startfor a dev server.
npm run electronin a separated terminal, to run the application inside electron platform.
The app will automatically reload if you change any of the source files.
Create a package for a native Windown application
npm run electron-package-win.
Now you can run the executable
angular-electron.exe you found under the folder