No ionic back button visable following view change via $state.go ionic -


i have 2 views follows

    .state('tab.matches', {     url: '/matches',     views: {       'tab-matches': {         templateurl: 'templates/bant-tab-matches.html',         controller: 'matchesctrl'       }     }   })     .state('tab.matches-detail', {     url: '/matches/:matchid/:userid/:username',     views: {       'tab-matches': {         templateurl: 'templates/bant-tab-matches-detail.html',         controller: 'matchesdetailctrl'       }     }   }) 

i have button on different view on click calls function in controller follows:

$scope.messageuser = function (postinfo) {  $state.go('tab.matches-detail', { matchid: var1, userid: var2, username: var3 });  } 

this redirects tab.matches-detail view expected button not present. button redirect parent view being tab.matches, or view redirected from. if navigate tab.matches tab.matches-detail (when have not redirected $state.go) button present. going direct tab.matches-detail when $state.go called. such can no longer access tab.matches if click on tab , return tab.matches displays tab.matches-detail no way access parent state of tab.matches. can't figure out how button display. need controlled controller rather href in view need call similar functionality actionsheet logic controller side.

apologies rather verbose explanation want clear on issue.

thanks in advance help.

anthony

to resolve issue set button in view not visible setting hide-back-button="true" in <ion-view> tag, added button header follows:

<ion-nav-buttons side="left"  class="button-clear custombutton">   <div class = "buttonmatchesinner" ng-click="matchesgoback()">             <i class="ion-chevron-left matchlefticon"></i>   </div> </ion-nav-buttons> 

with click event calling:

    $scope.matchesgoback = function() {         $state.go('tab.matches');     } 

Comments