1 possible answer(s) on “Custom back button onclick

  1. This is how I am doing this :

    1. <ion-nav-back-button></ion-nav-back-button> is defined in my tabs.html
    2. On the specific template where I need a custom function to be executed, I insert the ion-nav-back-button again :

    <ion-nav-back-button ng-click="cancel()">Cancel</ion-nav-back-button>
    3. and finally In the controller :
    $scope.cancel = function () { // insert whatever you want to do; $ionicHistory.goBack();};