Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49385

How to handle prompt alerts in ionic native

$
0
0

@champion007 wrote:

Requirement - user confirmation for otp sent i am giving option for user to resend the otp for second time until user exceeds the counts i dont want to close the prompt alert. here is my code -

let prompt = this.alertCtrl.create({
      title: 'Verification',
      enableBackdropDismiss: false,
      inputs: [
        {
          name: 'otp confirmation',
          placeholder: 'Enter one time password',
          type: "tel",
          id: "confrminput",

        },
      ],
      buttons: [
        {
          text: 'Re-send OTP',
          handler: data => {
            //How to handle here
          }
        },
        {
          text: 'Confirm',
          handler: data => {
            //confirmed - if wrong how to handle without closing the prompt alert.

          }
        }
      ],
    message: "Please enter 6 digit OTP code sent to your mobile number",
    });

    prompt.present();
  }

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>