I have a list on a view and each item of the list when clicked renders a new view. I want it to be sliding from the right edge of the screen like in default android (I assume). The default NavControl.push() method in Ionic2 renders the new view like it appears out of no where. From the Ionic2 docs, it is mentioned obscurely that, this may be possible (but no examples are given). From the docs regarding NavOptions,
Some methods on NavController allow for customizing the current transition. To do this, we can pass an object with the modified properites.
The property 'animation' understands the following values: md-transition, ios-transition and wp-transition.
Can anyone explain how this NavOptions is used to change the animation of NavController.push()?
Just use :
var navOptions = {
animation: 'ios-transition'
};
this.navController.push(NewPage, null, navOptions);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With