【问题标题】:Angular 4: " SCRIPT5022: Exception thrown and not caught" polyfill error in IE 9Angular 4:IE 9 中的“SCRIPT5022:抛出异常且未捕获”polyfill 错误
【发布时间】:2017-11-09 13:15:20
【问题描述】:

我的应用程序使用 Angular 4.0.0 和 "angular-polyfills": "^1.0.1",它适用于除 IE9 以外的所有浏览器

我取消了 polyfills.ts 文件中所有行的注释

import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';

我在 IE9 中遇到了这个错误

     try {
                return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);
            }
            catch (error) {
                if (this._zoneDelegate.handleError(this, error)) {
                    throw error;
                }
            }
        }
        finally {
            // if the task's state is notScheduled or unknown, then it has already been cancelled
            // we should not reset the state to scheduled
            if (task.state !== notScheduled && task.state !== unknown) {
                if (task.type == eventTask || (task.data && task.data.isPeriodic)) {
                    reEntryGuard && task._transitionTo(scheduled, running);

我是否必须包含任何其他 polyfills 文件。提前致谢

【问题讨论】:

    标签: angular internet-explorer-9 compatibility


    【解决方案1】:

    有一个 polygon.ts 文件,其中包含注释代码,表示取消注释以支持 IE9。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-12
      • 1970-01-01
      相关资源
      最近更新 更多