-
Notifications
You must be signed in to change notification settings - Fork 586
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
MouseEvent is used from window in off-click #258
Comments
Link to valor-software/ngx-bootstrap#61 |
I'd say valor-software/ngx-bootstrap#964 is more relevant, since it seems the problem has re-appeared. so the fix is to add these lines in off-click.ts:
|
Can we get some love for this particular issue? That's one of the few things that blocks me from angular-universal server-side rendering. I can do a dedicated PR, that does the same hack as valor-software/ngx-bootstrap@d20ccf1. Will it be useful? |
Please just fix this. by adding this line:
|
Hey guys I have the same issue here ! is there any workaround ? |
You should add it to the top of the bundled ng2-select js file |
Hi @jessedegans , Can your provide the exact filename that the "fix" code needs to be place please? None of the files seem suitable so don't know if I'm missing something? |
I found a temporary solution to this problem. I put a text replacing plugin regexp-replace-loader to webpack config:
|
I have inserted this line in .../node_modules/angular2-multiselect-dropdown/clickOutside.d.ts after the imports line but the same error is thrown ! After angular universal compilation in this command below. ngu-sw-manifest --module src/app/app.module.ts --out dist/ngsw-manifest.json |
The off-click uses MouseEvent which is an object from the global window. Angular2-modules should avoid direct access to window to be compatible with Angular-Universal and WebWorker.
When I started to use ng2-select with server-side-rendering of Angular-Universal I had errors like "MouseEvent is not defined" and had to define MouseEvent in nodes-global.
The text was updated successfully, but these errors were encountered: