A simple lock screen component with numbers for your Ionic App
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Minor fixes. Mar 7, 2018
.gitignore First commit. Mar 7, 2018
LICENSE First commit. Mar 7, 2018
README.md Add docs. Mar 7, 2018
package-lock.json Minor fixes. Mar 7, 2018
package.json
tsconfig.json

README.md

Ionic Lock Screen Component

This is a simple lock screen component with numbers for your Ionic 2+ app.

The module is based on the work of Carson Chen and the ionic2-lock-screen.

Using this module in an Ionic app

// Import the module and component
import { LockScreenModule, LockScreenComponent } from 'ionic-simple-lockscreen';

@NgModule({
  declarations: [
    // ...
  ],
  imports: [
    LockScreenModule // Put the module here
  ],
  entryComponents: [
    LockScreenComponent, // And add the component here
  ],
  providers: []
})
export class AppModule {}

Once you have imported the module, you can use it inside your pages like this:

import { LockScreenComponent } from 'ionic-simple-lockscreen';
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {

  constructor(public navCtrl: NavController) {

  }

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

}