I want to open another page on the model page, Currently, I am first dismissing the model page then opening another page but that taking time to open another page and it's a bad user experience.
import { Component } from '@angular/core';
import { NavController,AlertController,ModalController } from '@ionic/angular';
import {FirstPage} from '../first/first.page';
@Component({
selector: 'app-page-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss']
})
export class HomePage {
constructor( private modalCtrl:ModalController,private alertCtrl:AlertController) {}
async moveToFirst()
{
const modal = await this.modalCtrl.create({
component: FirstPage
});
await modal.present();
const { data } = await modal.onWillDismiss();
console.log(data);
this.router.navigate(['secondpage']);
}
}
How can I achieve it to open another page from the modal page fast? Thanks in advance.