Create a web and desktop application with Angular and electronJS



Installation of prerequisites


Install nodejs. Go to and download the installer.


I took the version “12.4.0 Current”

We’re checking the intallation.

node -v


Install git. Go to

Check the correct installation

git version
git version


Nodejs is required to install Angular/cli.

Install the latest version of Angular with npm (node package manager)

npm install @angular/cli
ng version



We’re going to make a copy (git clone) of Maxime GRIS’ excellent work.

git clone

We go into the folder of our application (in this case Angular-Electron) and install the dependencies

cd angular-electron
npm install

Launch the default web application in a browser with the following command

npm run ng:serve:web

The url should be available at http://localhost:4200/#/ .

To start the desktop software in development mode. Type the following command:

npm start

A window starts and you get this


npm run build:prod

This command will compile the web application in mode — aot . I refer you to the excellent article by Sébastien Olivier which explains the usefulness of this method of compilation aot (ahead of time)

Once the application is compiled, simply move all the files in the dist/ directory to an FTP directory for example.

Creating an Executable application when it is very easy also. It can take some time. This is normal. It is done with the following command:

npm run electron:windows

In the release/folder



Thanks to A.A for translating this article

Published on Medium