Get Previous Title returns an unexpected title


#1

I’m using $ionicNavBarDelegate.getPreviousTitle() to display the previous title on the back button, as suggested in the Ionic docs.

If I press back $ionicNavBarDelegate.getPreviousTitle() returns the literal last view title I was in (the one I pressed back on), not the view title pressing back again is going to bring me to. Is this intended? If so how do I go about displaying the view back is going to bring you to.

I’ve forked an Ionic Navigation demo to illustrate the issue http://codepen.io/anon/pen/DJdBk. Press Facts, then More Facts. Then go back. Notice how the text in back is now ‘Also Factual’, I would have expected this to be ‘Home’ i.e. where pressing back will bring you.

Any help would be great. Thanks!