【发布时间】:2020-02-03 20:46:49
【问题描述】:
我的 angular2 应用程序仅在 Microsoft Edge 中抛出异常声明 对象不支持此操作。请查看下图:
我调试并发现异常是在 promise then code 时抛出的。更具体地说,我在下面的代码中收到错误:
this.dataLayerService
.postLogin(this.model, this.postURL)
.then(usermasterResponse => this.setToken(usermasterResponse))
.catch(error => {
this.toastCommunicationService.setMessage(error, "",
this.toastCommunicationService.errorType)
});
我也在 index.html 文件中添加了下面的脚本,但也是徒劳的。
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.1/es6-shim.js"></script>
任何帮助将不胜感激。
【问题讨论】:
标签: javascript angular promise microsoft-edge angular-promise