Build Angular Desktop Apps With Electron (QuickStart)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
e2e
src
.angular-cli.json
.editorconfig
.gitignore
README.md
karma.conf.js
main.js
package-lock.json
package.json
protractor.conf.js
tsconfig.json
tslint.json

README.md

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)

  • Run npm run electron-build to 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.js and comment out mainWindow.loadURL(...dist/index.html...)
  • Run npm start for a dev server.
  • Run npm run electron in 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

  • Run npm run electron-package-win.

Now you can run the executable angular-electron.exe you found under the folder angular-electron-win32-x64.

Based on Jeff Delaney's sample (Thank you!)

Here's Jeff's post, you can also check the video lesson on youtube and the original source code on github.