问题
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>
link: https://ionicframework.com/docs/api/components/nav/NavPush/
But i can't find a way to change the transition to left-to-right (like IOS transitions).
How can i change the default transition?
Thanks
回答1:
Update:
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.
Old:
You need to do it like this:
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.
You can read more about it here.
来源:https://stackoverflow.com/questions/45827903/ionic-default-push-pop-transitions