Javascript Angular 2应用程序在InternetExplore中无法正常工作,但可以与其他浏览器配合使用
我的angular应用程序适用于除internet explorer之外的所有web浏览器。它在控制台中显示此错误 polypills.ts看起来像这样Javascript Angular 2应用程序在InternetExplore中无法正常工作,但可以与其他浏览器配合使用,javascript,angular,internet-explorer-11,Javascript,Angular,Internet Explorer 11,我的angular应用程序适用于除internet explorer之外的所有web浏览器。它在控制台中显示此错误 polypills.ts看起来像这样 * BROWSER POLYFILLS */ /** IE9, IE10 and IE11 requires all of the following polyfills. **/ import 'core-js/es6/object'; import 'core-js/es6/function'; import 'core-js/e
* BROWSER POLYFILLS
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/number';
import 'core-js/es6/string';
import 'core-js/es6/array';
/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';
(window as any).__Zone_enable_cross_context_check = true;
因为来自
与我无关,我发现问题与polyfills无关。错误来自新的java脚本函数,该函数使用了IE不支持的语法。仅适用于chrome等浏览器。我将语法更改为旧版本并修复了该问题。现在与IE配合也很好 您可以参考下面的链接:这些错误在IE控制台中显示为语法错误。