Here are the steps I took to add to the existing Electron AngularJS application.
1. Cloning an existing application Angular git clone https://github.com/angular/angular-seed.git .
2. cd angular-seed .
3. npm install --save electron .
4. In the / app main.js create and insert the file:
const electron = require('electron') object, if you do not, the window will const electron = require('electron') is garbage collected. const electron = require('electron') . const electron = require('electron') __dirname} / index.html`) const electron = require('electron') ) { const electron = require('electron') would store windows const electron = require('electron') multi windows, this is the time const electron = require('electron') . const electron = require('electron') has finished const electron = require('electron') windows. const electron = require('electron') this event occurs. const electron = require('electron') ', function () { const electron = require('electron') applications and their menu bar const electron = require('electron') explicitly with Cmd + Q const electron = require('electron') ) { const electron = require('electron') ) { const electron = require('electron') -create a window in the app when the const electron = require('electron') no other windows open. const electron = require('electron') rest of your app specific main process const electron = require('electron')
- In / app, create an empty file renderer.js.
- The root package.json add
"main": "main.js" .
- In the "scripts" package.json change the "start" on the
"start": "electron ." .
npm install && npm start .
source share