Aurelia TypeScript 应用程序无法在 Internet Explorer 10 中运行

Aurelia TypeScript application not working in internet explorer 10

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

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

我们如何解决这个问题?

直接取自 the documentation 应用程序配置和启动页面中的内容。

Aurelia was originally designed for Evergreen Browsers. This includes Chrome, Firefox, IE11 and Safari 8. However, we also support IE9 and above through the use of additional polyfills. To support these earlier browsers, you need to add an additional polyfill for MutationObservers. This can be achieved by a jspm install of github:polymer/mutationobservers. Then change your index.html startup code as follows:

Polyfill configuration

<!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>