Skip to content
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

Pnotify for angular throws syntax error in IE. #343

Closed
Sonik20 opened this issue Jun 1, 2018 · 4 comments
Closed

Pnotify for angular throws syntax error in IE. #343

Sonik20 opened this issue Jun 1, 2018 · 4 comments

Comments

@Sonik20
Copy link

Sonik20 commented Jun 1, 2018

@hperrin Can you please help here. Thanks
2018-06-01_15-23-22

@munisravan
Copy link

I'm facing the same problem, can someone help in this context.

@smithk58
Copy link

smithk58 commented Aug 9, 2018

This is happening because they're using arrow functions, which can't be polyfilled back into older browsers like IE. So you'll have to use the ES5 js files if you want to support older browsers. Those don't appear to import nicely into Angular 6 though for some reason, but I'll update this if I figure that part out.

Edit:
So to get around it you can add the iife PNotify/PNotifyButtons scripts to your angular.json
scripts": [ "./node_modules/pnotify/dist/iife/Pnotify.js", "./node_modules/pnotify/dist/iife/PNotifyButtons.js" ]

Then in your pnotify service up in your imports section add the following to make it not complain about them not existing:
declare var PNotifyButtons: any;
declare var PNotify: any;

@munisravan
Copy link

Thank you @smithk58 for your hepl, your solution fixed my app in IE.

@hperrin
Copy link
Member

hperrin commented Nov 24, 2018

Thanks, @smithk58!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants