Clearing History in Ionic


#1

Hello I looked at $ionicViewService.clearHistory()

But it does not wok.


#2

Have you tried navClear?

http://ionicframework.com/docs/nightly/api/directive/navClear/


#3

No will try it and let you know. Thanks.


#4

I need to clear the nav history in controller, so I checked the source code od that directive and find this:

      $ionicViewService.nextViewOptions({
        disableAnimate: true,
        disableBack: true
      });

I add it in controller code before $state.go(…), and it can work.