离子默认推送/弹出过渡 [英] Ionic default push/pop transitions

查看:78
本文介绍了离子默认推送/弹出过渡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Ionic的新手,我正在学习使用文档.

I'm new with Ionic, and i'm learning using the docs.

看到我可以在模板中推送页面,就像这样:

Saw that i can push a page in the template, like this:

<button ion-button [navPush]="pushPage"></button>

链接: https://ionicframework.com/docs/api/components/nav/NavPush/

但是我找不到改变从左到右过渡的方法(例如IOS过渡).

But i can't find a way to change the transition to left-to-right (like IOS transitions).

如何更改默认过渡?

谢谢

推荐答案

更新:

您可以使用> 本地页面转换 插件.您需要进行全局配置.然后,在每个页面上使用navPush时,您将拥有过渡页面动画.

You can use Native Page Transitions plugin.You need to configure it globally.Then you'll have that transition page animations when you'll use navPush on each and every page.

:

您需要这样做:

this.navCtrl.push(pushPage, {
    animation: true, direction: 'forward'
});

NavController上的某些方法允许自定义当前 过渡.为此,我们可以将修改后的对象传递给 属性.

Some methods on NavController allow for customizing the current transition. To do this, we can pass an object with the modified properites.

您可以阅读更多的 在此

You can read more about it here.

这篇关于离子默认推送/弹出过渡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆