Refresh a page in ionic2

前端 未结 8 1393
灰色年华
灰色年华 2020-12-16 00:34

Is there a way to refresh only a page i.e. only one screen in ionic2.

I tried :

window.location.reload();

and

loca         


        
8条回答
  •  青春惊慌失措
    2020-12-16 00:55

    Html:

      
        
      
    
    
    

    TypeScript :

    @Component({...})
    export class NewsFeedPage {
    
      doRefresh(refresher) {
        console.log('Begin async operation', refresher);
    
        setTimeout(() => {
          console.log('Async operation has ended');
          refresher.complete();
        }, 2000);
      }
    
    }
    

    source : Ionic doc

提交回复
热议问题