-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
window is not defined issue #707
Comments
Hmm interesting! I would be open to a pull request to check if window exists before attempting to use it, and if not, then it immediately sets |
Do you have any news? |
No update yet I'm afraid. But a quick search revealed this thread on the angular universal repo: angular/universal#830 which suggests that when you have a problem with a module trying to access I have never used Angular, or Angular Universal, but I'm interested to know: do you actually want to run this plugin code on the server side? And if so, why? |
Closing due to inactivity |
IMPORTANT: please note that the autoFormat feature (format-as-you-type) was removed in v8.0.0 - read more here: #346. Please do not open any new issues about this topic.
IMPORTANT: we use libphonenumber for formatting and validation - if your issue relates to one of these things, please check their test site first and if you see the problem there please file an issue with them instead: https://rawgit.com/googlei18n/libphonenumber/master/javascript/i18n/phonenumbers/demo-compiled.html
Steps to reproduce
When you use it in angular 5 universal server side rendering project.
window exist only on browser side, we got "window is not defined" issue when factory($, window, document) is called (build/js/intlTelInput.js file at line 11)
Expected behaviour
check if 'window' exists before use it
Actual behaviour
window is not defined Exception is thrown when window does not exist
Initialisation options
List any options you're using e.g. utilsScript or preferredCountries
The text was updated successfully, but these errors were encountered: