New Feature Request: Check whether $ionicNavBarDelegate has history

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.

Is this not possible?

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.

$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.

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

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.