How to disable/change animation between views in ion-nav-view

不问归期 提交于 2019-12-05 19:30:10

问题


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?


回答1:


angular.module('YOUR_APP_NAME_HERE').config(function($ionicConfigProvider) {
  $ionicConfigProvider.views.transition('none');
});

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




回答2:


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/



来源:https://stackoverflow.com/questions/29098079/how-to-disable-change-animation-between-views-in-ion-nav-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!