Ionic-1 Navigation

I am working on an Ionic-1 App. I am terrible confused in managing the back history of my app. Consider this scenario:

  1. Start from home page then
  2. Does a 3 step user registration process
  3. After the end of user registration redirect to records page

Now clicking back button (hard or soft back) I want to navigate back to home instead of cycling through user registration process. There are other scenarios like this where back behavior needs to be modified. Are there any references around to implement back behavior systematically? Should I manually define view hierarchy tree structure and somehow figure out where in tree current view is and then go to parent?


                    $ionicHistory.nextViewOptions({
                        disableBack: true
                    });
                    $state.go('records-page-name');

put this on your registration view so ionic navigator won’t navigate back to this view

Thanks for you reply. Let me check and will get back soon!