{"id":13581072,"url":"https://github.com/ThorstenHans/ngx-electron","last_synced_at":"2025-04-06T06:32:29.256Z","repository":{"id":17938178,"uuid":"83036453","full_name":"ThorstenHans/ngx-electron","owner":"ThorstenHans","description":"A simple Angular wrapper for electron's Renderer API","archived":true,"fork":false,"pushed_at":"2023-01-07T02:17:51.000Z","size":2563,"stargazers_count":428,"open_issues_count":34,"forks_count":88,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-05-19T03:19:37.941Z","etag":null,"topics":["angular","electron","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThorstenHans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-24T11:50:32.000Z","updated_at":"2024-04-05T10:44:27.000Z","dependencies_parsed_at":"2023-01-11T19:44:03.183Z","dependency_job_id":null,"html_url":"https://github.com/ThorstenHans/ngx-electron","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThorstenHans%2Fngx-electron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThorstenHans%2Fngx-electron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThorstenHans%2Fngx-electron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThorstenHans%2Fngx-electron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThorstenHans","download_url":"https://codeload.github.com/ThorstenHans/ngx-electron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445652,"owners_count":20939952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","electron","hacktoberfest"],"created_at":"2024-08-01T15:01:57.781Z","updated_at":"2025-04-06T06:32:28.924Z","avatar_url":"https://github.com/ThorstenHans.png","language":"TypeScript","funding_links":["https://www.patreon.com/bePatron?u=16380186"],"categories":["TypeScript"],"sub_categories":[],"readme":"# ngx-electron\n\n[![Build Status](https://travis-ci.org/ThorstenHans/ngx-electron.svg?branch=master)](https://travis-ci.org/ThorstenHans/ngx-electron)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)\n\n`ngx-electron` is a small Module for [Angular](http://angular.io) which makes calling [Electron](https://electronjs.org) APIs from the `Renderer Process` easier. By adding it to your Angular project, you'll get IntelliSense and a simple Angular service which acts as facade for Electron APIs.\n\n`ngx-electron` is licensed under [MIT](https://opensource.org/licenses/MIT).\n\n## Introduction\n\nCheckout the introduction post on my [blog](https://thorsten-hans.com/integrating-angular-and-electron-using-ngx-electron) for more details.\n\n## Support me\n\n[![Become a Patron!](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/bePatron?u=16380186)\n\n## Installation\n\n`ngx-electron` can be installed easily using either `yarn` or `npm` commands in the scope of an angular project.\n\n```bash\nyarn add ngx-electron --save\n# or\nnpm install ngx-electron --save\n```\n\nThe `NgxElectronModule` needs to be import in your `root` Angular module (eg `AppModule`).\n\n``` typescript\nimport { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { AppComponent } from './app.component';\n\nimport { NgxElectronModule } from 'ngx-electron';\n\n\n@NgModule({\n    declarations: [],\n    imports: [\n      BrowserModule,\n      NgxElectronModule\n    ],\n    bootstrap: [AppComponent]\n})\nexport class AppModule {\n\n}\n```\n\nOnce the module has been imported, you can easily use dependency injection to get an instance of `ElectronService`.\n\n``` typescript\nimport { Component } from '@angular/core';\nimport { ElectronService } from 'ngx-electron';\n\n@Component({\n  selector: 'my-app',\n  templateUrl: 'app.html'\n})\nexport class AppComponent {\n\n    constructor(private _electronService: ElectronService) { }\n\n    public playPingPong() {\n        if(this._electronService.isElectronApp) {\n            let pong: string = this._electronService.ipcRenderer.sendSync('ping');\n            console.log(pong);\n        }\n    }\n}\n```\n\n## ElectronService\n\nThe `ElectronService` is exposing all API's accessible from within Electron's renderer process. **If your app is not running inside electron, all getters will return NULL instead**.\n\n### Properties\n\n  * `desktopCapturer: Electron.DesktopCapturer` - Electron's desktop capturing API\n  * `ipcRenderer: Electron.IpcRenderer` - Electron IpcRenderer\n  * `remote: Electron.Remote` - Electron Remote capabilities\n  * `webFrame: Electron.WebFrame` - Electron WebFrame\n  * `clipboard: Electron.Clipboard` - Clipboard API\n  * `crashReporter: Electron.CrashReporter` - Electron's CrashReporter\n  * `process: NodeJS.Process` - Electron's Process Object\n  * `screen: Electron.Screen` - Electron's Screen API\n  * `shell: Electron.Shell` - Electron's Shell API\n  * `nativeImage: Electron.NativeImage` - Electron's NativeImage API\n  * `isElectronApp: boolean` - Indicates if app is being executed inside of electron or not\n  * `isMacOS: boolean` - Indicates if app is running in electron and on `macOS`\n  * `isWindows: boolean` - Indicates if app is running in electron and on `Windows`\n  * `isLinux: boolean` - Indicates if app is running in electron and on `Linux`\n  * `isX86: boolean` - Indicates if app is running in electron and on a `x86` architecture\n  * `isX64: boolean` - Indicates if app is running in electron and on a `x64` architecture\n  * `isArm: boolean` - Indiciates it app is running in electron adn on a `ARM` architecture\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThorstenHans%2Fngx-electron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThorstenHans%2Fngx-electron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThorstenHans%2Fngx-electron/lists"}