SPA异步调用在IE 11中不起作用

SPA async calls not working in IE 11

本文关键字:不起作用 IE 异步 调用 SPA      更新时间:2023-09-26

我发现了与IE9类似的线程,但与IE11不同。

我用TypeScript用Angular构建了一个SPA。

但是,我对WebAPI的异步调用并没有刷新前端的数据。即使我按下Ctrl+F5(强制刷新),也只显示我第一次进入网站时处于活动状态的数据。

问题出在哪里?我已经拆除了所有控制台-TypeScript文件中的引用。

呼叫示例:

private getPerson(id: number): void {
            this.dataContainer.GetPerson(id).then((data) => this.personDataFetched(data), (errorInfo) => this.serverFail(errorInfo));
        }
private personDataFetched(data: Services.Person): void {
            this.$scope.currentPerson = data; // This data doesn't update even if I force refresh
        }

hansmaad为我提供了一个包含答案的线程。如果你有这个问题,请看这里:

https://stackoverflow.com/a/26798913/1128364