ng-code-verification

Ng Code Verification

Usage no npm install needed!

<script type="module">
  import ngCodeVerification from 'https://cdn.skypack.dev/ng-code-verification';
</script>

README

Ng Code Verification

Build Status

NgCodeVerification

Angular component for code verification

Alt Text

How to install

Install component with NPM

    $ npm install ng-code-verification

Quickstart

Import ng-code-verification module in Angular app.

With default mask config options

import { NgCodeVerification } from 'ng-code-verification'

@NgModule({
  imports: [
    NgCodeVerification,
  ],
})

Usage

<ng-code-verification [codeTotal]="4" (codeComplete)="onComplete($event)"></ng-code-verification>

Arguments

Argument Description
codeTotal Number total of code verification
codeComplete Function that will call after all the codes was completed

Output return

The codeComplete return an object with two keys:

  • code (the code that was digited by user)
  • valid (boolean -> check if all codes was digited)

Help

if you need more help with this component talk to me contato@sergiocardoso.dev