Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use with Angular 9 #42

Open
ReedOwens opened this issue Apr 7, 2020 · 2 comments
Open

How to use with Angular 9 #42

ReedOwens opened this issue Apr 7, 2020 · 2 comments

Comments

@ReedOwens
Copy link

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:
image

@btxtiger
Copy link

btxtiger commented Apr 8, 2020

Did you try import * as Photon from 'electron-photon' ?
As far as I know, you can not use require to handle ES6 imports.

@ReedOwens
Copy link
Author

Yes, I did that but none of the CSS is in the app. On the plus side, there are no errors in the log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants