I’m using ‘routerLink’ to navigate to a new page and I was wondering how I could disable the page transition animation? I couldn’t find an answer to that simple question in the documentation or here (I only found answers to old versions of Ionic / Angular).
Could someone please point me to the right spot?
The parameter has changed from "animate" to "animated".
ie. in app.module.ts, do the following
IonicModule.forRoot({animated: false});
To only disable page transition animations, while leaving the rest of the animations alone, add animated="false"
to the <ion-router-outlet>
:
<ion-router-outlet id="main-content" animated="false"></ion-router-outlet>
For people who want to control specified page only, you can use NavController
of Ionic4 giving { animated: false }
as NavigationOptions.
import { NavController } from '@ionic/angular';
constructor(public navCtrl: NavController,) {}
this.navCtrl.navigateForward(path, { animated: false });
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