I build an angular app and then wrapped it using Electron.
My dir structure looks like this :
Project
|--electron
---|-main.js
-----|-index.html (and other files copied from webapp/dist)
|--webapp (angular app)
---|-src
-----|-app
-------|-service
I tried inter-process communication (ipcMain
and ipcRenderer
) but it got hanged up!
Then I came to know about webcontent.executeJavascript();
So I made a service in angular which has a various functions like eventFromHost()
& sendMessage()
.
how do I call this function from electron's main.js using webcontent or any other method?