Pin Dialog

Improve this doc

Repo: https://github.com/Paldom/PinDialog

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add cordova-plugin-pin-dialog
    $ npm install --save @ionic-native/pin-dialog
    
  2. Add this plugin to your app's module

Supported platforms

Usage

import { PinDialog } from '@ionic-native/pin-dialog';


constructor(private pinDialog: PinDialog) { }

...

this.pinDialog.prompt('Enter your PIN', 'Verify PIN', ['OK', 'Cancel'])
  .then(
    (result: any) => {
      if (result.buttonIndex == 1) console.log('User clicked OK, value is: ', result.input1);
      else if(result.buttonIndex == 2) console.log('User cancelled');
    }
  );

Instance Members

prompt(message, title, buttons)

Show pin dialog

Param Type Details
message string

Message to show the user

title string

Title of the dialog

buttons string[]

Buttons to show

Returns: Promise<{ buttonIndex: number, input1: string }>

API

Native

General