ngx-electronyzer
v18.1.0
Published
Angular library that provides integration of the Electron API into an Angular application
Downloads
221
Readme
Angular library that provides integration of the Electron API into an Angular application
The library was built as a replacement of ngx-electron, which is not currently under development.
Install
npm install ngx-electronyzer
Usage
The library consists of an Angular service that acts as a wrapper over the Electron API. You can use Angular dependency injection to import the service:
import { Component } from '@angular/core';
import { ElectronService } from 'ngx-electronyzer';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html'
})
export class AppComponent {
constructor(private electronService: ElectronService) { }
}
The service is currently exposing the following capabilities:
desktopCapturer
- Electron Desktop capturing APIipcRenderer
- Electron IpcRendererwebFrame
- Electron WebFrameclipboard
- Electron ClipboardcrashReporter
- Electron CrashReportershell
- Electron Shell APInativeImage
- Electron NativeImage APIisElectronApp
- Indicates if app is being executed as a desktop oneisMacOS
- Indicates if app is running onmacOS
isWindows
- Indicates if app is running onWindows
isLinux
- Indicates if app is running onLinux
isX86
- Indicates if app is running onx86
architectureisX64
- Indicates if app is running onx64
architectureisArm
- Indicates it app is running onARM
architecture
Notice that all the above properties work normally, if you run the Angular application in the browser. However, their values will not be correct. So, make sure that you use the
isElectronApp
properly in your application.
The remote
module is not supported in this library because it is no longer available in Electron, as it was the case in ngx-electron. You can read more about the removal here.
🙏 Acknowledgements
Many thanks to Thorsten Hans for his great work and inspiration on the original integration with ngx-electron.