-
Notifications
You must be signed in to change notification settings - Fork 687
Hammerjs window undefined issue #189
Comments
Thanks for reporting the issue! The problem is window is a Browser only object, at the moment you could do some conditional things such as isBrowser from Universal, to make sure it's not used on the server side pretender of your App. You can follow the general issue here, where support for window and other globals will be added: (if at the very least suppressed and ignored on the server) |
Thank you for the quick response 👍 |
thanks, the current workaround was added to app.node.module |
Hi, having troubles to use Hammer with server side renderin. p.s. alos - MarkPieszak is Angular universal going to support window since task you provided is closed |
@ng-state if you have an issue it would be best to open an issue for it since this one is pretty outdated as for your second comment I have a proposal here: angular/universal#828 |
I've added hammerjs like this in my webpack:
And everything works, however i get the window undefined error from the server. I know how to do DI Swapping and this is what i do when i need window usually but the problem here is that i think it's angular that is causing the error this time because this is the error i get:
Now as far as i can say it doesn't really break anything it just throws the error.
The text was updated successfully, but these errors were encountered: