How to disable/change animation between views in i

2019-04-05 18:20发布

I started an Ionic tabs project. With this project comes the default animation between views (which is from left to right when entering, and from right to left when going back). I would like to retain control on this - by specifying two type of view animations:

  • from bottom to up
  • no animation

So far I tried to disable the animation as follows, as was suggested on this Ionic Forum Topic but it did not change anything:

<ion-nav-view animation="no-animation"></ion-nav-view>

What is going on?

2条回答
做个烂人
2楼-- · 2019-04-05 19:04
angular.module('YOUR_APP_NAME_HERE').config(function($ionicConfigProvider) {
  $ionicConfigProvider.views.transition('none');
});

http://ionicframework.com/docs/api/provider/$ionicConfigProvider#views.transition

查看更多
祖国的老花朵
3楼-- · 2019-04-05 19:06

Another way.

The transition type which the nav view transition should use when it animates. Current, options are ios, android, and none.

Home

http://ionicframework.com/docs/api/directive/navTransition/

查看更多
登录 后发表回答