【问题标题】:Aurelia TypeScript application not working in internet explorer 10 [closed]Aurelia TypeScript 应用程序无法在 Internet Explorer 10 中运行 [关闭]
【发布时间】:2016-07-28 10:26:00
【问题描述】:

我们使用 aurelia 框架创建了单页应用程序。我们在 aurelia 应用程序中使用es7 decorators。该应用程序在 chrome 和 firefox 中运行良好,但在 IE 9,10 中无法运行。但它在 IE 11 中可以正常工作。

浏览器控制台显示错误"Unhandled promise rejectionError"

我们如何解决这个问题?

【问题讨论】:

  • 您需要将旧版浏览器作为自述文件添加到您引用的存储库中。

标签: internet-explorer typescript aurelia ecmascript-2016


【解决方案1】:

直接取自应用配置和启动页面内的the documentation 本身。

Aurelia 最初是为 Evergreen 浏览器设计的。这包括 Chrome、Firefox、IE11 和 Safari 8。但是,我们也支持 IE9 和 上面通过使用额外的 polyfills。为了支持这些 较早的浏览器,您需要为 突变观察者。这可以通过 jspm install 来实现 github:聚合物/突变观察者。然后更改您的 index.html 启动 代码如下:

Polyfill 配置

<!doctype html>
<html>
  <head>
    <title>My App</title>
  </head>
  <body>
    <script src="jspm_packages/system.js"></script>
    <script src="config.js"></script>
    <script>
      SystemJS.import('core-js').then(function() {
        return SystemJS.import('polymer/mutationobservers');
      }).then(function() {
        SystemJS.import('aurelia-bootstrapper');
      });
    </script>
  </body>
</html>

【讨论】:

  • 非常感谢。成功了
猜你喜欢
  • 2012-06-06
  • 2023-03-31
  • 1970-01-01
  • 2013-12-09
  • 2013-03-30
  • 2020-05-25
  • 1970-01-01
  • 1970-01-01
  • 2020-06-10
相关资源
最近更新 更多