Custom back button with aside menu

Hi guys, I have developed a custom back button when model changes, but I’m having an issue:

In my view I have back button && aside menu button, how can I control the press button at the aside?.

When I click in Back button all goes well as supposed, this is my code:

.controller("Ctrl", function($scope, $ionicHistory, $rootScope, ids, utils, $ionicPopup, Auth, ajax, $translate) {
    // grab pointer to original function
    var oldSoftBack = $rootScope.$ionicGoBack;
_newChangeBack =  function() {
      // do something interesting here
      var confirmPopup = $ionicPopup.confirm({
        title: $translate.instant('Back'),
        template: $translate.instant('back_change')

      confirmPopup.then(function(res) {
        if (res)
          $rootScope.$ionicGoBack = oldSoftBack;


    $scope.onChange = function(){
      $rootScope.$ionicGoBack = _newChangeBack;

Here I control all the clicks at ionic back button, but I don’t know how to control the clicks at the aside menu.

Thank you a lot.

no body knows? I don’t know how to make this working :frowning: