有没有办法只刷新一个页面,即 ionic2 中只有一个屏幕。
我试过了 :
window.location.reload();
和
location.reload();
但它会重建应用程序。有没有办法只刷新该页面(特定屏幕)。
还尝试过:
<ion-input *ngIf="no_internet === 1" (click)="refresh($event)"></ion-input>
在打字稿中:
refresh(refresher) {
console.log('Begin async operation', refresher);
setTimeout(() => {
console.log('Async operation has ended');
refresher.complete();
}, 2000);
}
原文由 Narendra Vyas 发布,翻译遵循 CC BY-SA 4.0 许可协议
试试这个代码: