npm.io
1.2.2 • Published 8 years ago

recaptcha-blackgeeks

Licence
MIT
Version
1.2.2
Deps
1
Size
80 kB
Vulns
0
Weekly
0

Recaptcha Blackgeeks

This is just very simple Angular 5 component that implements Image-Text Recaptcha.

HTML View

![Image of BlackGeeks-Recaptcha] (https://i.imgur.com/o4clLc6.png)

Installation

Install it from npm:

npm install recaptcha-blackgeeks --save

Usage

Module
...
import { BlackgeeksRecaptchaModule } from 'recaptcha-blackgeeks';
...
 ...
@NgModule({
  imports: [...,BlackgeeksRecaptchaModule]
  })
  ...
View

Use in template like below

 <blackgeeks-recaptcha></blackgeeks-recaptcha>

Methods

To access the methods, use @ViewChild.

Import
import { ViewChild } from '@angular/core';
import { RecaptchaComponent } from 'recaptcha-blackgeeks';

export class RegisterComponent {
  @ViewChild(RecaptchaComponent) captcha: RecaptchaComponent;
}
Usage

You can request a new captcha to be displayed:

this.captcha.reset();

The previous response can be retrieved:

let status = this.captcha.getResponse();

Keywords