【发布时间】:2017-05-13 10:32:38
【问题描述】:
有没有办法只刷新一个页面,即在 ionic2 中只刷新一个屏幕。
我试过了:
window.location.reload();
和
location.reload();
但它会重建应用程序.. 有没有办法只刷新该页面(特定屏幕)。
也试过了:
<ion-input *ngIf="no_internet === 1" (click)="refresh($event)"></ion-input>
在 TypeScript 中:
refresh(refresher) {
console.log('Begin async operation', refresher);
setTimeout(() => {
console.log('Async operation has ended');
refresher.complete();
}, 2000);
}
【问题讨论】:
-
你能解释一下你到底想在你的页面中更新什么吗?使用ionic时还有其他方式上传内容,不建议刷新页面
标签: javascript html angular ionic2 refresher