Closed iwoogy closed 4 years ago
Do window lib installed and import already ? Also are u using the latest ngx-lightbox. Latest version should be 2.1.1
I upgraded ngx-lightbox to version 2.1.1 from 2.0.0 and I installed window too.
I required window in server.ts
Then I have this error :
Do you have an idea how to fix it ?
Hey I dont know whether this error relates to lightbox. Maybe this issue is related ?
Could be.
I think it's better to avoid dependencies on window for Angular Universal.
Let's close this ticket.
Yeah I agree that using extra dependancy is not really needed. However, if u have any solutions that would not require using window
dependancy, PR is always welcomed and I would be more than happy to merge it.
I encountered the "window" problem. I solved it using "domino". I share my files, maybe for someone's benefit.
package.json
server.ts
Hello
Thanks for your component, it has been really useful.
I'm about to deploy and I found an issue with Angular Universal.
I got the error ReferenceError: Document is not defined.
I followed the instruction on Angular Universal by adding global['window'] = window; in server.ts
Thanks for your help
Bobby