mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
Cannot get a ipc connection to run with aspnetcore 2.1 & angular 6 #266
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ffetech on GitHub (Jan 31, 2019).
Originally assigned to: @GregorBiswanger on GitHub.
Hello Gregor, Hello Robert, Hello all,
Thank you for this library!
I have a AspNetCore 2.1 Angular 6 App with ElectronApi 0.11. "electronize start" works fine and the app starts fine but I cannot get a ipc connection to run.
I have an Angular service with the following parts of code to establish a ipc connection. Its executing immediately after angular app start,
import { IpcRenderer } from 'electron';...if (process.versions.electron && (<any>window).require)this.ipc = (<any>window).require("electron").ipcRenderer;...this.ipc.send("connect", "x");This is my code on C# side
var browserWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false });browserWindow.OnReadyToShow += () =>{Electron.IpcMain.On("connect", args => Connect());browserWindow.Show();};if I make a sendSync on angular side, the app freezes. Do you have some idea what i did wrong.