I haven’t had a reason to try but look at this post and how they add an ng-click to the back button
You could check the current state and if on the state for the new contact use $ionicHistory.goBack(-2) otherwise use $ionicHistory.goBack() to go back to the previous page for all other states.
Make sense?