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

前端 未结 6 911
不知归路
不知归路 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条回答
  •  [愿得一人]
    2021-01-30 13:30

    Use $ionicHistory in your controller before calling $state.go('app.home').

    .controller('HomeCtrl', function($scope,...,$ionicHistory) {
      ...
      $ionicHistory.nextViewOptions({
        disableBack: true
      });
    
      $state.go('app.home');
    });
    

提交回复
热议问题