How to pass data from Electron to Ionic?

Hi,
I’ve embedded a Ionic app into an Electron program.
Since the authentication take place in the Electron side I’d like to pass some data: username, password, etc. from Electron to Ionic.
Is it possible?
what is the technique that I have to use?
Is there an area for data exchange?

thank you

cld

I’ve found this article: “Integrating Angular and Electron using ngx-electron” , and it seems to work.
It uses ngx-electron and the ipc Api of Electron.

1 Like

IPC is the secret sauce of Electron. I don’t quite understand what you mean the auth occurs in Electron? Do you mean it occurs in the main process and not in the render process?

My Ionic Generator (https://chrisgriffith.wordpress.com/2017/09/28/ionic-app-generator/) is an Electron app that uses Ionic for the UI layer.

Chris
author, Electron: From Beginner to Pro

Yes in my app the authentication occurs in the Electron main process and passes the authentication data to the render process (Ionic app) using IPC.
Now it is working.
Is it a wrong solution?

The only problem I’ve found is that the data arrives to Ionic a bit late and I have to wait the arrival of these data.

cld