Refresh a page in ionic2

前端 未结 8 1375
灰色年华
灰色年华 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 01:04

    Try this: $window.location.reload(); $route.reload() use to reload route.

    if you are using $stateProvider : $state.go($state.current, {}, {reload: true});

    or

    var currentPageTemplate = $route.current.templateUrl;
    $templateCache.remove(currentPageTemplate);
    $route.reload();
    
    0 讨论(0)
  • 2020-12-16 01:07

    Try this code :

    this.navCtrl.setRoot(this.navCtrl.getActive().component);
    
    0 讨论(0)
提交回复
热议问题