I am using the below code to prevent the state change in ui-router.
$rootScope.$on('$stateChangeStart',
function(event, toState, toParams, fromState, fromParams){
event.preventDefault();
});
but again if I move to any state it displays ionic back button enable.
As per my knowledge it is adding to the ionicHistory but couldn't find any solution.
Help with the solution please.