Electron Basics: How to Configure and Run an Angular Electron App
Electron lets you build desktop applications for Windows, Mac, and Linux. When you build an app using Electron, you can preview and run the app through a desktop application window.
you’re able to use Electron to configure an Angular app to launch on a desktop window, instead of the usual web browser. You can do this using a JavaScript file within the app itself.
Once you configure Electron, you can continue development as you would on a regular Angular app. The main parts of the application will still follow the same standard Angular structure.
How to Install Electron as Part of Your Application
To use Electron, you need to download and install node.js, and use npm install to add Electron to your app.
The File Structure of the Angular Electron Application
Electron will require a main JavaScript file to create and manage the desktop window. This window will display the contents of your app within it. The JavaScript file will also contain other events that can occur, such as if the user closes the window.
At runtime, the content displayed will come from the index.html file. By default, you can find the index.html file inside thesrcfolder, and at runtime a built copy of it is automatically created inside thedistfolder.

The index.html file usually looks like this:
Inside the body tag is an tag. This will display the main app component for the Angular application. You can find the main app component in thesrc/appfolder.

How to Use Electron to Open an Angular Application in a Desktop Window
Create the main.js file, and configure it to open the application’s content inside a desktop window.
How to Run an Electron Application
To run your application in a window, configure a command in the scripts array of package.json. Then, run your app using the command in the terminal.
Building Desktop Applications With Electron
You can use Electron to build desktop applications on Windows, Mac, and Linux. By default, you can test an Angular application using a web browser via the ng serve command. You can configure your Angular application to also open in a desktop window instead of a web browser.
You can do this using a JavaScript file. You will also need to configure your index.html, and package.json files. The overall application will still follow the same structure as a regular Angular application.
![]()
If you want to learn more about how to build desktop applications, you can also explore Windows Forms apps. Windows Forms apps allow you to click and drag UI elements onto a canvas while also adding any coding logic into C# files.
Get to grips with Microsoft Visual Studio and develop your own apps with Windows Forms with almost no coding required.

These films will leave you questioning humanity, but also wanting more.
These are the best free movies I found on Tubi, but there are heaps more for you to search through.
Tor spoiled me forever.
Anyone with more than a passing interest in motorsports must see these films.
Lose your laptop without this feature, and you’ll wish you had turned it on.