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'
}
}
})