Closed SachinShekhar closed 4 years ago
It seems that this won't fix my issue because you are merely a wrapper and firebaseui
itself is the main offender to use global window object.
For anyone else stuck on this (I was) - I got round it by creating a separate module that contains all the sign-in logic and then used angular lazy-loading in the router to access this module.
In the server.ts file I also had make this route served by the browser.
server.get('/login', function (req, res) {
res.sendFile(join(distFolder, 'browser', 'index.html'));
});
I can see here in this service that you've referenced window object directly:
This is not a standard Angular practice. To enforce singleton behavior, there's Dependency Injection system in place. See this.
My Problem: Because of this, SSR (Angular Universal) is throwing error.
Consider it as a bug and/or feature request, but please remove window reference.