Angular 4不会在IE上更新* ngfor列表吗?

时间:2017-11-06 15:07:03

标签: angular

我有一个简单的列表,如:

<input type="text" [(ngModel)]="newItem" (click)="addNewItem()">

<ul>
    <li *ngFor="let item of list">{{item.name}}</li>
</ul>

在输入新项目后,列表会被重新获取,但列表在IE11上没有更新。

On Chore它完美无缺!

包括es6-shim!

即使我刷新页面也不会更新。它仅在重建恐惧应用程序时更新。

在控制台上,我看到没有错误,但是来自服务器的更新数据。

更新:它是IE上的缓存问题。通过向标头添加缓存控制解决了

this.headers = new Headers({
    'Cache-control': 'no-cache',
    'Pragma': 'no-cache'
}) 

任何提示? 提前谢谢!

0 个答案:

没有答案