How to Open Popup after first Popup in IONIC2

I am trying to make Forgot Password Screen where Popup Window open and where when we click on OK after “Enter Phone Number” then Other Popup will open that will ask for Enter the OTP sent to your Phone Number.
image
image

Here is my Sample Code, please have a look.
FIRST POPUP-
openFilters() {
let prompt = this.alertCtrl.create({
title: ‘Reset Password’,
message: “Please enter your Mobile no to reset your Password.”,
inputs: [
{
/* name: ‘title’,/
placeholder: ‘Mobile Number’
},
],
buttons: [
/
{
text: ‘Cancel’,
handler: data => {
console.log(‘Cancel clicked’);
}
},*/
{
text: ‘OK’,
handler: () => {

        console.log('Enter OTP Clicked');
      }
    }
  ]
});
prompt.present();

};

SECOND POPUP-
openFilters3() {
let prompt = this.alertCtrl.create({
/title: ‘Reset Password’,/
message: "Please enter OTP sent to your Mobile Number *****785",
inputs: [
{
/
name: ‘title’,
/
placeholder: ‘OTP’
},
],
buttons: [
{
text: ‘Resend OTP’,
handler: data => {
console.log(‘Resend clicked’);
}
},
{
text: ‘DONE’,
handler: data => {

        console.log('Saved clicked');
      }
    }
  ]
});
prompt.present();

};

On your ‘OK’ handler in openFilters () call the openFilters3 () function

text: 'OK',
handler: () => {
   console.log('Enter OTP Clicked');
   this.openFilters3 ();
}
1 Like

Thanks ! It worked man :slight_smile: