gpt4 book ai didi

Angular 2 最终版本 IE11 TypeError : Object doesn't support this action

转载 作者:行者123 更新时间:2023-12-04 17:54:02 25 4
gpt4 key购买 nike

我有一个 Angular 2 应用程序,最初在 Internet Explorer 版本 10 和 11 中遇到问题,如我在此处的帖子所述:Angular 2 Release (2.0.1) Internet Explorer (SystemJS) Syntax Error .

由于某种原因,该错误消失了(可能来自该问题的答案),但现在我收到以下错误:

TypeError: Object doesn't support this action
at MyAppService.prototype.myFunction(eval code:64:9)
at Anonymous function (eval code:359:21)
at SafeSubscriber.prototype.__tryOrUnsub (eval code:223:13)
at SafeSubscriber.prototype.next (eval code:172:17)
at Subscriber.prototype._next (eval code:125:9)
at Subscriber.prototype.next (eval code:89:13)
at MapSubscriber.prototype._next (eval code:83:9)
at Subscriber.prototype.next (eval code:89:13)
at onLoad (eval code:1230:25)
at ZoneDelegate.prototype.invokeTask (http://localhost:56159/node_modules/zone.js/dist/zone.js:234:17)

其中 MyAppService 是我创建的服务,myFunction 是该服务中定义的函数,我正在从我的组件中调用它。

虽然我希望这个问题可能与垫片有关 - 我同时加载了 es-5 和 es-6:

<script src="./node_modules/es5-shim/es5-shim.js"></script>
<script src="./node_modules/es6-shim/es6-shim.js"></script>

今天早些时候通过 npm 下载,高于我的所有其他 Angular 脚本。

该应用程序在 Chrome 和 Firefox 中都运行良好

有什么想法吗?

最佳答案

如果有人遇到类似问题,您需要包含 url-polyfill,因为 IE 不支持 URL。 npm i url-polyfill 并将其导入到 polfills.ts 文件中。这就是我的问题。

关于Angular 2 最终版本 IE11 TypeError : Object doesn't support this action,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41967129/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com