Custom Animations Per View

With the current ion-nav-view’s you can setup the slide-left-right on your views, but is there any way to specifically dictate which animation? It would be nice to say, this one comes in left, disappears right, or comes in left and disappears left, and possibly another for No Animations. ion-nav-view animation=“slide-left-right”

Looking forward to any updates on this.

Thanks,
David

Right now, there doesn’t appear to be a way to modify the animations between views - at least not easily. You could use different nav-views for various states to allow this.

See this post for some info : Animation slide left right not all pages

There is already a feature request issue # 614 : https://github.com/driftyco/ionic/issues/614

Hi, is there any update regarding this feature already? I have buttons namely previous and next. When I press previous I want the view to animate and slide from right to left and for next button the other way around.

Hope to get some response. Thanks!

Hi I did it like so…

In your HTML file:

<span ng-click="swipeRight()">next</span>

In your controller:

  $scope.swipeRight = function(){
    $ionicViewSwitcher.nextDirection("forward");
    $state.go("splash-book");
  };

Of course you have to inject the $ionicViewSwitcher and $state services into your controller.

Thanks for sharing! I’ll try to implement this.