Angular Captcha
Google reCaptcha implementation for Angular 5 and beyond.
Installation
npm install ngx-captcha
Import NgxCaptchaModule
to your module (i.e. AppModule
) and configure site keys for reCaptcha.
import { NgModule } from '@angular/core';
import { NgxCaptchaModule } from 'ngx-captcha';
@NgModule({
imports: [
NgxCaptchaModule.forRoot({
reCaptcha2SiteKey: 'xxxx',
invisibleCaptchaSiteKey: 'yyy'
}),
})
export class AppModule { }
Usage
reCaptcha2
<ngx-recaptcha2
[size]="size"
[hl]="lang"
[theme]="theme"
[type]="type"
(expire)="handleExpire()"
(load)="handleLoad()"
(success)="handleSuccess($event)">
</ngx-recaptcha2>
Invisible captcha
<ngx-invisible-recaptcha
[type]="type"
[badge]="badge"
(load)="handleLoad()"
(success)="handleSuccess($event)">
</ngx-invisible-recaptcha>
For more details please visit https://enngage.github.io/ngx-captcha/