ionicNavBarDelegate.back not working from pages from menu?


#1

I am using ionicNavBarDelegate injected into specific pages in my app so that I can use the back() function. I do this because I don’t want all my pages to have the back button. (Let me know if there’s an easier way than this).

I also have a side menu.

For every page that is clicked from the side menu, the ionicNavBarDelegate.back() button does not work. However for every page where I navigate to by clicking links, the ionicNavBarDelegate.back() button does work. Why is this? What am I doing wrong and how do I correct it?

I dont think I need to include much code because everything is very standard…every page has a goToPrevious() function that calls ionicNavBarDelegate.back()

I will include a bit of the state provider of my menu cause I think that might be the issue…What am I missing?

$stateProvider
      .state('app', {
        url: "/app",
        abstract: true,
        templateUrl: "templates/menu.html",
        resolve:{
          initialize: ['principal',function(principal){
            return principal.initialization();
          }]
        },
        controller: 'MenuCtrl'
      })

.state('app.settings', {
  url: "/settings",
  views: {
    'menuContent' :{
      templateUrl: "templates/settings.html",
      controller: 'SettingsCtrl'
    }
  }
})

#2

Where you able to figure this out? I am having the same issue. I have a specific page that I want full screen, so I hid the top bar and have a custom back button that calls ionicNavBarDelegate.back() and just like your example, it does nothing. I even tried to call the parent controllers ionicNavBarDelegate.back() with no success.


#3

Hello did you find a way to accomplish this?