I am completely new to Ionic 2, heard about it just a week ago. So I read around on Ionic and created a few sample apps also by following some online videos. It is indeed a great way to cut the efforts of developing multi-platform application(s) by at least half.

Then I heard about Electron and was able to embed some Angular 2 applications into Electron to get a Desktop version of those applications. Works great!

Next I wanted to try embedding an Ionic 2 app into Electron. I am sure I am not doing some setting somewhere right. I mean I get the main HTML I have for Ionic but it only shows the Title of the HTML in my Electron Desktop application window title bar. It doesn’t load the actual Ionic 2 app. The ionic app doesn’t really have much just a few different components are getting displayed. I also tried it with simple default Ionic 2 app that gets created with the command “ionic start myionic2app --v2”, this also did not work.

I would highly appreciate if somebody can please guide me in the right direction or give some pointers on how to do this.

Then I copied the main.js and renderer.js from the Electron quick start folder and pasted into the new Ionic2 folder.

Then in the main.js I changed the pathname to:
path.join(__dirname, ‘www/index.html’),

The ran ionic serve - this creates the contents of the www folder including the index.
Then open a new terminal and ran:
npm install && npm start

While this worked for me and I had a desktop app running with my Ionic2 app inside, I have not yet been able to get the ipc communications working from the Ionic side to the main process running in Electron.

If anyone knows how to get that working - I would love to hear about it.@gauz09: You mentioned you had angular2 working… did you try ipc?

Were you able to package your ionic-electron app using electron-builder perchance? I’ve tried but have been unsuccessful I’m able to build my app on my mac but once I click on the app icon only the electron app runs giving me a blank screen.
I do notice that if I run $ > ionic serve before I clicked on the app icon everything seems to run fine.

Thanks Rob for the tutorial. I had my application built for desktop following your tutorial but the icon coming is the default electron icon. Will you be able to help and guide how to update my application icon instead of default icon in the package.