Closed
Description
Thanks for @katowulf advice.
Think you found a bug?
Yes, I found a bug in angular auth when running on nodejs with angular universal universal starter repo
Version info
- @angular/ 4.2.4
- firebase: 4.5.0
- angularfire2: 5.0.rc-2
Steps to set up and reproduce
- clone universal starter repo
- add firebase module to app module
- add auth in app.component.ts
- run
npm run build:dynamic && npm run serve:dynamic
- get error
I make an sample repository here to view my code
ERROR
Failing test unit, Plunkr, or JSFiddle demonstrating the problem
Expected behavior
In my opinion, angularfire2 already have XMLHttpRequest library, but maybe some problem when bootstrap. Maybe you can fix this bug and I don't have to add XMLHttpRequest manually
Actual behavior
get error with XMLHttpRequest.
Solution: I add this on top, error gone.
// server.ts file
(global as any).XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
// your code next...
Metadata
Metadata
Assignees
Labels
No labels