标签: refresher

在ionic2中刷新页面

有没有办法只刷新一个页面,即ionic2中只有一个屏幕.

我试过了 :

window.location.reload();
Run Code Online (Sandbox Code Playgroud)

和

location.reload();
Run Code Online (Sandbox Code Playgroud)

但它重建应用程序..有没有办法只刷新该页面(特定屏幕).

还尝试过:

<ion-input *ngIf="no_internet === 1" (click)="refresh($event)"></ion-input>
Run Code Online (Sandbox Code Playgroud)

在TypeScript中:

refresh(refresher) {
    console.log('Begin async operation', refresher);

    setTimeout(() => {
        console.log('Async operation has ended');
        refresher.complete();
    }, 2000);
}
Run Code Online (Sandbox Code Playgroud)

html javascript refresher ionic2 angular

13
推荐指数
1
解决办法
3万
查看次数

标签 统计

angular ×1

html ×1

ionic2 ×1

javascript ×1

refresher ×1