Hey,
I have a flow in my app where users are signing up. What i want to do it make it so that once they have hit the final “done” button and the account created, the history is cleared/reset.
Currently i am running this flow by changing state.
In my searching I have found “$ionicViewService.clearHistory();” this seems to work however it seems to be too late when i try it and there is still a back button.
I then tried the events below. These seemed to work as well but again too late. The view shows the back button but it doesnt go anywhere. What do i do to “refresh” or start another user flow. I feel this has got to be simple so I know i must be missing something.
$scope.$on('$ionicView.leave', function () {
$ionicViewService.clearHistory();
});
$scope.$on('$ionicView.beforeLeave', function () {
$ionicViewService.clearHistory();
});
$scope.$on('$ionicView.afterLeave', function () {
$ionicViewService.clearHistory();
});
$scope.$on('$ionicView.enter', function () {
$ionicViewService.clearHistory();
});
Any help or advice would be greatly appreciated.
Dale