Photon
Photon copied to clipboard
How to use with Angular 9
I'm starting an Electron project using Angular 9 as the JS Engine. I've got other frameworks like Proton, and Xel (which uses web components) to work with Angular 9/Electron. I'm not sure how to get this cool package of yours to work.
For Web-Components there is a special change needed in the app.modules.ts file to add CUSTOM_SCHEMA to the schemas so that they are picked up. I've done this.
Your doc says to use
const Photon = require("electron-photon");
This doesn't work in Angular 9. It looks like an error trying to load the CSS.
Here is the console log:
Did you try import * as Photon from 'electron-photon'
?
As far as I know, you can not use require to handle ES6 imports.
Yes, I did that but none of the CSS is in the app. On the plus side, there are no errors in the log.