Disable back button with $ionicNavBarDelegate


#1

I am trying to disable the back button on my HomeController page, after navigating from IntroController. I’m using $ionicNavBarDelegate.showBackButton(false); but it’s completely ignoring it.

I’ve setup a CodePen with an example: http://codepen.io/anon/pen/miqkz

Thanks in advance!


#2

You just need add nav-clear in your anchor :slight_smile:


#3

Try wrapping $ionicNavBarDelegate.showBackButton(false); in a timeout.

So:

  $timeout(function(){
   $ionicNavBarDelegate.showBackButton(false);
  },100);

#4

Hi @coen_warmer,

I’ve tried your trick and it does work.

Thanks!