Angular Captcha is Google reCaptcha implementation for Angular 13.
Use with Angular forms
Depending on whether you want to use reactive forms or template-driven forms, you need to include the appropriate modules as well. Add ReactiveFormsModule to your imports if you want to use interactive forms. If you prefer the template-based approach, simply add a FormsModule to your module.
reCaptcha v3
This is a beta implementation of google reCaptcha v3 as per the following documentation “developers.google.com/recaptcha/docs/v3“.
Features:
- reCaptcha v2
- reCaptcha v3 (beta)
- invisible reCaptcha
Must Read: A Simple hCaptcha Integration Component Library Using Vue.js
How to make use of it:
Installation
npm install ngx-captcha
1. Import NgxCaptchaModule to your module (i.e. AppModule)
import { NgModule } from '@angular/core'; import { ReactiveFormsModule } from '@angular/forms'; import { NgxCaptchaModule } from 'ngx-captcha'; @NgModule({ imports: [ ReactiveFormsModule, NgxCaptchaModule }) export class AppModule { }
2. Usage.
export class YourComponent implements OnInit { protected aFormGroup: FormGroup; constructor(private formBuilder: FormBuilder) {} ngOnInit() { this.aFormGroup = this.formBuilder.group({ recaptcha: ['', Validators.required] }); } }
<form [formGroup]="aFormGroup"> <ngx-recaptcha2 #captchaElem [siteKey]="siteKey" (reset)="handleReset()" (expire)="handleExpire()" (load)="handleLoad()" (success)="handleSuccess($event)" [useGlobalDomain]="false" [size]="size" [hl]="lang" [theme]="theme" [type]="type" formControlName="recaptcha"> </ngx-recaptcha2> </form>
See Also –
A Lightweight Image Rotation (Captcha) Verification Plugin | RVerify.js
👷♂️ Emoji Captcha Verification For Websites | eCaptcha
🎉A Verification Code Input For Vue.js
See Demo And Download
Official Website(Enngage): Click Here
This superior jQuery/javascript plugin is developed by Enngage. For extra advanced usage, please go to the official website.