Angular 2+:Internet Explorer:无法获取未定义或空引用的属性“调用" [英] Angular 2+: Internet Explorer: Unable to get property 'call' of undefined or null reference

查看:113
本文介绍了Angular 2+:Internet Explorer:无法获取未定义或空引用的属性“调用"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Angular 4.2.4(Angular-CLI 1.1.3)中,IE11我得到了SCRIPT1002: Syntax errorSCRIPT5007: Unable to get property 'call' of undefined or null reference.我已经加入了polyfills,我以为Webpack和Angular-CLI会完成其余的工作.我在这里想念什么?

In Angular 4.2.4 (Angular-CLI 1.1.3), IE11 I get SCRIPT1002: Syntax error and SCRIPT5007: Unable to get property 'call' of undefined or null reference. I have my polyfills in and I would have assumed that Webpack and Angular-CLI would have done the rest. What am I missing here?

Unable to get property 'call' of undefined or null reference在其后说:bootstrap 50034e0a1f93dabcb117 (54, 1),没有实际文件名的指示.然后Syntax error表示它在vendor.bundle.js (63117,26)中,它看起来像:

Unable to get property 'call' of undefined or null reference says after it: bootstrap 50034e0a1f93dabcb117 (54, 1) with no indication of a real filename. And Syntax error says it's in vendor.bundle.js (63117,26), which looks like:

window.setTimeout(() => {
    window.removeEventListener('click', suppressClick, true);
}, 0);

更新:以前对我来说应该更明显,但这看起来像ES6代码,应该编译为ES5.

Update: Should have been more obvious to me before, but this looks like ES6 code, and it should be compiling down to ES5.

推荐答案

对于仍然遇到此问题的任何人,请尝试以下操作:

For anyone still running into this issue, try this:

Angular 2+:IE 11无法获得未定义或空引用的属性调用"

如果您遇到的错误发生在一大堆看起来像这样的代码上:

If the error you're getting occurs on a hunk of code that looks like this:

window.setTimeout(() => {
    window.removeEventListener('click', suppressClick, true);
}, 0);

...然后请让我知道该解决方案是否有效.我将更新此答案,并可能将此问题标记为重复.

...then please let me know if the solution worked or not. I will update this answer, and possibly mark this question as duplicate.

我不认为这是同一时间的问题,因为bundle.js中不同代码上出现的错误.有人否决了这个答案,却没有就这些问题是否有相同的解决方案提供任何反馈.

I DO NOT BELIEVE THESE TO BE THE SAME ISSUE AT THIS TIME, AS THE ERRORS OCCURRED ON DIFFERENT CODE IN bundle.js. Someone voted this answer down, without giving any feedback on whether or not these questions have the same solution.

我目前尚无方法对此进行测试,但想引导人们使用可能解决方案.

I do not have a way to test this currently, but wanted to direct folks to a possible solution.

这篇关于Angular 2+:Internet Explorer:无法获取未定义或空引用的属性“调用"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆