【发布时间】:2016-05-10 12:07:50
【问题描述】:
我试图弄清楚为什么我的 Angular 2 应用程序在 IE 11 中运行时卡在显示 Loading...。
根据某人的建议,我尝试了这个 plunker,由某人在 chrome 和 IE 11 上的堆栈溢出上发布。在 Chrome 上工作正常,但在 IE 11 上失败。同样的错误,坚持说“正在加载... "
plunker 是: https://plnkr.co/edit/6zVFbrH5yohwc714gBbk?p=preview
<!DOCTYPE html>
<html>
<head>
<script>document.write('<base href="' + document.location + '" />');</script>
<title>Router Sample</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-shim.min.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.1/angular2-polyfills.js"></script>
<script src="https://code.angularjs.org/tools/system.js"></script>
<script src="https://code.angularjs.org/tools/typescript.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.1/Rx.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.1/angular2.dev.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.1/http.dev.js"></script>
<script>
System.config({
transpiler: 'typescript',
typescriptOptions: { emitDecoratorMetadata: true },
packages: {'src': {defaultExtension: 'ts'}}
});
System.import('src/boot')
.then(null, console.error.bind(console));
</script>
</head>
<body>
<my-app>loading...</my-app>
</body>
</html>
有人知道为什么 IE 11 无法运行 Angular 2 应用程序吗?
谢谢!
【问题讨论】:
-
答案是暂时使用 2.0.0-beta.0。
标签: angular typescript internet-explorer