Ionic 默认 push/pop 转换

Ionic default push/pop transitions

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

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

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

link: https://ionicframework.com/docs/api/components/nav/NavPush/

但我找不到将过渡更改为从左到右的方法(如 IOS 过渡)。

如何更改默认转换?

谢谢

更新:

您可以使用 Native Page Transitions plugin.You 需要配置它 globally.Then 当您在每个页面上使用 navPush 时,您将拥有过渡页面动画.

旧:

你需要这样做:

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

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

您可以阅读更多内容about it here