Hello everyone,
I can’t find how to change the animation of the ion-back-button, with Ionic v4.
I found this topic, which shows how to do it in v3, but the Navbar element no longer exists. Similarly, the new ion-nav element no longer works, since it is replaced by ion-toolbar, so its functions can no longer be used.
Do you know how to do this?
There is a class named Config, in @ionic/angular, that allows you to do that. Too bad it’s not documented in the official doc, it would have saved me days of research
Too bad it’s not documented in the official doc, it would have saved me days of research
Actually, it is, it’s just well hidden. Config Doc
Can you describe what you changed in there to get the effect you wanted?
Yes of course. in the following example, we disable the transition when we leave the page
import { Config } from '@ionic/angular'
@Component({...})
export class Class {
constructor(private config: Config) {}
ionViewWillEnter() {
this.config.set("animated",false);
}
}