Ionic framework $state.go('app.home'); is adding back button on page where I want to go (how to remove it)?

前端 未结 6 995
不知归路
不知归路 2021-01-30 12:56

I have app with sidebar menu. I am on second page and I am calling controller function which redirect me to first page using:

$state.go(\'app.home\');
         


        
6条回答
  •  Happy的楠姐
    2021-01-30 13:26

    You can set nextViewOptions before $state.go('Yourstate'). Like In your controller, you can write,

    $ionicHistory.nextViewOptions({
      disableBack: true
    });
    $state.go('app.home');
    

    So for that transition, it will clear the history stack and sets next view as root of the history stack.

提交回复
热议问题