Nav-clear equivalent in controller

Hi, I’m an Ionic/Angular newbie at this point, apologies if this is an obvious answer.

I have the following code in my side menu controller which loads an action sheet when one of the menu buttons is clicked:

.controller('MenuCtrl', function($scope, $location, $ionicActionSheet, $ionicSideMenuDelegate) {
  $scope.showActions = function() {

      buttons: [
        { text: 'Contact Support' },
        { text: 'Account Settings' },
        { text: 'App Settings' },
      cancelText: 'Cancel',
      buttonClicked: function(index) {
        $ionicSideMenuDelegate.toggleRight(); // Close the menu
        if (index == 0) {
        } else if (index == 1) {
        } else if (index == 2) {
        return true;

As you see, I already figured out how to do the equivalent of menu-close by using $ionicSideMenuDelegate. But how can I do the equivalent of nav-clear in the controller? In other words, when $location.path() is called, rather than pushing onto the nav stack, I just want to load the view and reset the stack. I looked at the $ionicNavBarDelegate but it didn’t appear to have any clear method.

Thanks in advance for any help!

Solved my problem. I looked at the implementation of nav-clear and found what I needed:

  disableAnimate: true,
  disableBack: true

Cheers, really enjoying Ionic so far.


Awesome, glad to see you got this.

Just for reference, in case anyone else needs this, you can check out the js for any of our directives here.