Ionic 4 dismissOnPageChange

oki doki

so found that:

Loading

dismissOnPageChange was removed. Fortunatelly all the navigation API is promise based and there are global events (ionNavWillChange) you can listen in order to detect when navigation occurs.

You should take advantage of these APIs in order to dismiss your loading overlay explicitally.

source: https://github.com/ionic-team/ionic/blob/5f3c7cd755d2a9c0b6cabf6c0900168421c1e082/angular/BREAKING.md

Means I was wrong this wasn’t solved, it doesn’t exist anymore. I guess in the meantime I just changed my code during my migration and that’s why I thought if was good

So for example if you use a loadingController while navigating

async navigate() {
  const loading = await this.loadingController.create({});
  
  await loading.present();
  
  await this.navController.navigateForward('/your-route');
  
  await loading.dimiss();
}
1 Like