Ion-nav-view - How to disable history in one <ion-nav-view>

Hi, I need to load an state always at the first history point. Right now if i load the state and it was in the step two of the history it loads the step two. I’m looking for something like a it will be great not to use $ionicHistory.clearHistory() because it reset all the histories and i need just disable one.

$stateProvider.state('main', {
    url: '/main',
    views: {
        'main': {
            template: '<ion-nav-view></ion-nav-view>',
.state('main.stepone', {
    url: '/stepOne',
    templateUrl: 'templates/stepOne.html'
.state('main.steptwo', {
    url: '/stepTwo',
    templateUrl: 'templates/stepTwo.html'

Thank you guys!

If you are navigating you can use ui-routers $state.go function.
There is a “replace” option, which can replace the current history entry with the next one you are navigating to.

1 Like