New Feature Request: Check whether $ionicNavBarDelegate has history


#1

I have a view that can be displayed multiple ways. I want to test if the $ionicNavBarDelegate has history, and if so, go back(), otherwise I want to do $state.go() to a default page. How can this be done? I don’t see any method to check whether there is history in the ionicNavBarDelegate.


#2

Is this not possible?


#3

I also have the same need.
Currently, I checked $ionicViewService.getBackView()
and $ionicViewService.getBackView().go().

But I am not very sure if I am doing right or not.


#4

$ionicViewService isn’t documented and looking at the source it seems it is meant to be private. So I’m not sure if we should be using it directly.


#5

Hmm…You are right.
And I don’t know how to do it right.


#6

Haven’t heard anything from any of the Ionic folks…maybe this can’t be done? In which case I would like to make a new feature request.