Angular ui router

I want to make a state which occurs once only like app tutorial • and how to make a state which disable when certain conditions fulfill like login

        $ionicHistory.nextViewOptions({
            disableBack : true
        });

http://ionicframework.com/docs/api/service/$ionicHistory/

try it

@marcos_martins anh what about the conditional $state ?

Example, after you logged you have 3 ways to back to login page,
1- You use “$state.go”
2 - you use “ui-sref”
3- You click in a back button hardware in android

So, if you disable back button with ionic history and you dont create a route to go to that state, you will not be able to get in that state again

1 Like