Hi Borja, the blank page means that the angular application has some error usually because you forget to end some tag, so can you check the DevTools console?!!
To open it select toggle DevTools from the toolbar or add win.webContents.openDevTools(); after win.loadFile(resolve('build/index.html'));
It seems that your win.loadFile(); has a wrong path make sure that the path at this function located the index.html of the built application usually it lives at dist/your-app-name/index.html
Okay, dist/control-panel/index.html looks good but the output of the tsc "the main.ts file" where is it?!! I see that you have out-tsc directory if the main.js file is at this dir update you package.json replace dist/bin/main.js with dist/tsc-out/main.js.
Hi Ahmed! When running "npm run electron" for the first time, it shows a blank page. Have you ever had this problem? Thanks for the post!
Hi Borja, the blank page means that the angular application has some error usually because you forget to end some tag, so can you check the DevTools console?!!
To open it select toggle DevTools from the toolbar or add win.webContents.openDevTools(); after win.loadFile(resolve('build/index.html'));
This is what it shows.
thepracticaldev.s3.amazonaws.com/i...
It seems that your win.loadFile(); has a wrong path make sure that the path at this function located the index.html of the built application usually it lives at
dist/your-app-name/index.html
It seems that I forgot the
your-app-name
part at my post I'll update it.Here is my project structure: thepracticaldev.s3.amazonaws.com/i...
And here my main.ts file:
thepracticaldev.s3.amazonaws.com/i...
Okay,
dist/control-panel/index.html
looks good but the output of thetsc
"the main.ts file" where is it?!! I see that you haveout-tsc
directory if themain.js
file is at this dir update youpackage.json
replacedist/bin/main.js
withdist/tsc-out/main.js
.Can you upload your project to GitHub? or you can refer to the repo I have mentioned at the post so you can find the right structure.
Tell me if you still have an issue.
There it is: github.com/borjalo/control-panel
As I mentioned it was the output of
tsc
fixed hereThank you very much!
Let me know if you have any issues