Skip to content

A rewrote and a retouched version of ionic-lock-screen for AngularJS 2 and Ionic 2.

Notifications You must be signed in to change notification settings

gabestev/ionic2-lock-screen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

ionic2-lock-screen

Intro

A rewrote and a retouched version of ionic-lock-screen [https://github.com/AlexDisler/ionic-lock-screen] for AngularJS 2 and Ionic 2.

Credit to: Alex Disler

Features

Use

Import LockScreenComponent class in the component that you want to use the lock screen

import {LockScreenComponent} from "../ionic-lock-screen/lock-screen-component";

Please ensure that you have imported NavController and initialized it

import { NavController } from 'ionic-angular';
...
 constructor(public navCtrl: NavController){}

Load whenever you want to load

this.navCtrl.push(LockScreenComponent,{
      code:'1234',
      ACDelbuttons:true,
      passcodeLabel:'Please Enter Passcode',
      onCorrect:function(){
        console.log('Correct!');
      },
      onWrong:function(attemptNumber){
        console.log(attemptNumber + ' wrong passcode attempt(s)');
      }
    });

AC(All Clear) button and Del button is also available:

this.navCtrl.push(LockScreenComponent,{
      code:'1234',
      ACDelbuttons:true
});

Touch ID (iOS only)

Install cordova-plugin-touchid

$ cordova plugin add cordova-plugin-touchid --save

Set touchId:true

this.navCtrl.push(LockScreenComponent,{
      code:'1234',
  touchId: true,
});

About

A rewrote and a retouched version of ionic-lock-screen for AngularJS 2 and Ionic 2.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%