Skip to content

saimon24/Ionic-Lock-Screen-Component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)');
      }
    });
  }

}

About

A simple lock screen component with numbers for your Ionic App

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published