javascript - $ionicHistory.goBack() not working correctly -
i jump page not tab tab page.
on tab page,i want go-back when item clicked. use $ionichistory.goback()
go back.
i found strange situation, firsttime $ionichistory.goback()
working, second time not working。
my ionic version : 1.3.1
i have created a codepen demo
to reproduce bug:
click go dashpage button -> click select button -> click item -> click select button -> click item
ionic maintains history stack of tabs , menus separately.
updated answer
insted of
<ion-item ng-click="onitemclick()">item 1</ion-item>
try
<ion-item ui-sref="dash-page">item 1</ion-item>
let me know if helps
old answer
create own mygoback()
funtion
put in view
<ion-nav-buttons> <button class="button" ng-click="mygoback()"><i class="ion-chevron-left"></i> </button> </ion-nav-buttons>
and in controller
$scope.mygoback = function () { $ionichistory.goback(); }
Comments
Post a Comment