
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
angular2-recaptcha
Advanced tools
This is just very simple Angular 2 component that implements Google reCaptcha 2.
Install it from npm:
npm install angular2-recaptcha
System.config({
map: {
'angular2-recaptcha': 'node_modules/angular2-recaptcha'
},
packages: {
app: {
format: 'register',
defaultExtension: 'js'
},
'angular2-recaptcha': {defaultExtension: 'js', main:'index'}
}
});
...
import { ReCaptchaModule } from 'angular2-recaptcha';
...
...
@NgModule({
imports: [...,ReCaptchaModule]
})
...
Use in template like below
<re-captcha site_key="<GOOGLE_RECAPTCHA_KEY>"></re-captcha>
Where site_key is the Google reCaptcha public key. Optional parameters as follows:
light
(default) or dark
.image
(default) or audio
.normal
(default), compact
or invisible
.To catch the success callback, you will need to subscribe to the captchaResponse
event. The response token will be passed in the $event
parameter.
<re-captcha (captchaResponse)="handleCorrectCaptcha($event)" site_key="<GOOGLE_RECAPTCHA_KEY>"></re-captcha>
The event captchaExpired
is triggered when the displayed image has expired. It does not have any event parameters.
To access the methods, use @ViewChild.
import { ViewChild } from '@angular/core';
import { ReCaptchaComponent } from 'angular2-recaptcha';
export class RegisterComponent {
@ViewChild(ReCaptchaComponent) captcha: ReCaptchaComponent;
}
You can request a new captcha to be displayed:
this.captcha.reset();
The previous response can be retrieved:
let token = this.captcha.getResponse();
FAQs
Angular 6 component for Google reCaptcha
The npm package angular2-recaptcha receives a total of 1,691 weekly downloads. As such, angular2-recaptcha popularity was classified as popular.
We found that angular2-recaptcha demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.