themyth92 / ngx-lightbox

Lightbox2 use with angular >= 5
MIT License
115 stars 67 forks source link

don't work with electron, always show loading dialog #110

Closed saixin closed 2 years ago

saixin commented 2 years ago

Angular CLI: 12.0.0 Node: 12.18.2 Package Manager: npm 6.14.13 OS: win32 x64

Angular: 12.0.0 ... animations, cdk, cli, common, compiler, compiler-cli, core ... forms, material, platform-browser, platform-browser-dynamic ... router

Package Version

@angular-devkit/architect 0.1200.0 @angular-devkit/build-angular 12.0.0 @angular-devkit/core 12.0.0 @angular-devkit/schematics 12.0.0 @schematics/angular 12.0.0 rxjs 6.6.7 typescript 4.2.4 ngx-lightbox 2.5.1

"electron": "^10.1.0", "electron-builder": "^22.9.1"

this's a angular project, everything work fine on browser, but serve it under electron as local file, it's just always show the loading dialog, but after click the popup dialog ,it show the image correctly, at this time there's no JS error. 屏幕截图 2021-10-14 102938

themyth92 commented 2 years ago

Feel free to submit PR if u can fix it. Tks

chenchuraviteja commented 2 years ago

any solution for this issue

h5aaimtron commented 2 years ago

I suspect this issue largely depends on how you're using it in Electron. If you're loading from an asar which is effectively a zip, you have to validate your local url. Open your dev tools in electron (ctrl + shift + i) I think that is the key combo and check the console and network tabs. Make sure the url is right.