diff --git a/README.md b/README.md index 6b3762f..6a031c9 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ Bootstrap and package your project with Angular 10 and Electron 9 (Typescript + Currently runs with: -- Angular v10.0.9 -- Electron v9.2.0 +- Angular v10.0.14 +- Electron v10.1.0 - Electron Builder v22.8.0 With this sample, you can : diff --git a/main.ts b/main.ts index 4b3aa6e..feb7b14 100644 --- a/main.ts +++ b/main.ts @@ -20,6 +20,7 @@ function createWindow(): BrowserWindow { webPreferences: { nodeIntegration: true, allowRunningInsecureContent: (serve) ? true : false, + enableRemoteModule : false // true if you want to use remote module in renderer context (ie. Angular) }, }); @@ -52,9 +53,6 @@ function createWindow(): BrowserWindow { } try { - - app.allowRendererProcessReuse = true; - // This method will be called when Electron has finished // initialization and is ready to create browser windows. // Some APIs can only be used after this event occurs. diff --git a/package.json b/package.json index f964b3e..22005cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-electron", - "version": "8.0.3", + "version": "8.0.4", "description": "Angular 10 with Electron (Typescript + SASS + Hot Reload)", "homepage": "https://github.com/maximegris/angular-electron", "author": { @@ -42,56 +42,56 @@ }, "devDependencies": { "@angular-builders/custom-webpack": "9.2.0", - "@angular-devkit/build-angular": "0.1000.5", - "@angular-eslint/builder": "0.0.1-alpha.32", - "@angular-eslint/eslint-plugin": "0.0.1-alpha.32", - "@angular-eslint/eslint-plugin-template": "0.0.1-alpha.32", - "@angular-eslint/template-parser": "0.0.1-alpha.32", - "@angular/cli": "10.0.5", - "@angular/common": "10.0.9", - "@angular/compiler": "10.0.9", - "@angular/compiler-cli": "10.0.9", - "@angular/core": "10.0.9", - "@angular/forms": "10.0.9", - "@angular/language-service": "10.0.9", - "@angular/platform-browser": "10.0.9", - "@angular/platform-browser-dynamic": "10.0.9", - "@angular/router": "10.0.9", + "@angular-devkit/build-angular": "0.1000.8", + "@angular-eslint/builder": "0.2.0-beta.1", + "@angular-eslint/eslint-plugin": "0.2.0-beta.1", + "@angular-eslint/eslint-plugin-template": "0.2.0-beta.1", + "@angular-eslint/template-parser": "0.2.0-beta.1", + "@angular/cli": "10.0.8", + "@angular/common": "10.0.14", + "@angular/compiler": "10.0.14", + "@angular/compiler-cli": "10.0.14", + "@angular/core": "10.0.14", + "@angular/forms": "10.0.14", + "@angular/language-service": "10.0.14", + "@angular/platform-browser": "10.0.14", + "@angular/platform-browser-dynamic": "10.0.14", + "@angular/router": "10.0.14", "@ngx-translate/core": "13.0.0", "@ngx-translate/http-loader": "6.0.0", - "@types/jasmine": "3.5.12", + "@types/jasmine": "3.5.14", "@types/jasminewd2": "2.0.8", - "@types/mocha": "8.0.2", + "@types/mocha": "8.0.3", "@types/node": "12.12.6", - "@typescript-eslint/eslint-plugin": "3.9.0", - "@typescript-eslint/eslint-plugin-tslint": "3.9.0", - "@typescript-eslint/parser": "3.9.0", + "@typescript-eslint/eslint-plugin": "3.10.1", + "@typescript-eslint/eslint-plugin-tslint": "3.10.1", + "@typescript-eslint/parser": "3.10.1", "chai": "4.2.0", - "conventional-changelog-cli": "2.0.34", + "conventional-changelog-cli": "2.1.0", "core-js": "3.6.5", "cross-env": "7.0.2", - "electron": "9.2.0", + "electron": "10.1.0", "electron-builder": "22.8.0", "electron-reload": "1.5.0", - "eslint": "7.6.0", + "eslint": "7.7.0", "eslint-plugin-import": "2.22.0", "jasmine-core": "3.6.0", "jasmine-spec-reporter": "5.0.2", "karma": "5.1.1", "karma-coverage-istanbul-reporter": "3.0.3", "karma-electron": "6.3.1", - "karma-jasmine": "3.3.1", + "karma-jasmine": "4.0.1", "karma-jasmine-html-reporter": "1.5.4", - "mocha": "8.1.1", + "mocha": "8.1.3", "npm-run-all": "4.1.5", "rxjs": "6.6.2", "spectron": "11.1.0", - "ts-node": "8.10.2", + "ts-node": "9.0.0", "tslib": "2.0.1", "typescript": "3.9.7", "wait-on": "5.0.1", "webdriver-manager": "12.1.7", - "zone.js": "0.10.3" + "zone.js": "0.11.1" }, "engines": { "node": ">=10.13.0" diff --git a/src/app/core/services/electron/electron.service.ts b/src/app/core/services/electron/electron.service.ts index 9017c8a..7dc81e8 100644 --- a/src/app/core/services/electron/electron.service.ts +++ b/src/app/core/services/electron/electron.service.ts @@ -25,7 +25,9 @@ export class ElectronService { if (this.isElectron) { this.ipcRenderer = window.require('electron').ipcRenderer; this.webFrame = window.require('electron').webFrame; - this.remote = window.require('electron').remote; + + // If you wan to use remote object, pleanse set enableRemoteModule to true in main.ts + // this.remote = window.require('electron').remote; this.childProcess = window.require('child_process'); this.fs = window.require('fs');