-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(window): mocking window object #311
Conversation
|
||
export var window = win; | ||
global.window = win; | ||
GLOBAL.window = win; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's GLOBAL
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set those two justs in case :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like GLOBAL
and root
will be removed
nodejs/node#1838
kk merging |
@gdi2290 how it works? |
@thebarada please provide us with a working sample so we can reproduce your issue? |
@thebarada if you're talking about Material error there's a workaround in the universal-starter. you can track this issue for window "support" |
@gdi2290 I imported Ng1toNg2(Need Ng1toNg2 to make hybrid application routes works) module from ui-router, this requires angular 1.5.8 which uses window, and is throwing the error. node_modules/angular/angular.js:31766 ReferenceError: window is not defined` Is Angular 1.5.8 going to be supported? |
Angular 1.x.x is not supported for universal |
i'm trying to use masonry.js in universal starter pack with a 2.3 config Error: ReferenceError: window is not defined |
Looks like its merged.. How to implement global window object for SSR. I am still getting undefined window error. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR for #282