Ionic 5 router direction


I’m using Ionic 5 and router navigation from the controller as it’s even driven so can’t be on a routerLink.


I can’t find any references to how I make the page move from right to left rather than then default left to right as I believe was possible with routerDirection in earlier versions of Ionic.

Does anyone know how to specify the direction the page swipes when navigating like this please?



Same problem here. I try to set routerDirection on ion-button with click handler, no success til now. :confused:

Same here. Is there really no anwser to this simple problem?

Ok, I think navController should be used:

import { NavController } from '@ionic/angular';

But it`s the ionic 3 docs. Its still unclear, if navcontroller should still be used in Ionic 5

Here is a related stackoverflow entry:

Some people say, it should not be used anymore. So the question is still: How to go forward / backward in code (not template).