Menu button (icon) |
it'll substitute "menu" button as "Back" button :
$state.go('app.home');
Back button (icon) |
$state.go('app.home', {}, {
location: 'replace',
reload: true,
inherit: false
});
And gratefully, until I found a solution on stackoverflow, where people also facing the same issue as I did.
with code
$ionicHistory.nextViewOptions({
disableBack: true
});
is enough to achieve my expected ("refresh" view history) result.
angular.controller('AppCtrl', function($state, $ionicHistory) {
$scope.goHome = function () {
$ionicHistory.nextViewOptions({
disableBack: true
});
$state.go('app.home');
};
});
No comments:
Post a Comment
Hey, thank you for spending time leaving some thoughts, that would be really helpful as encouragement for us to write more quality articles! Thank you!