I've a form in angular 2 application. Once the user submits the form, if some thing wrong in the user input then I'm showing validation messages. Now the problem is I need to reset the reCAPTCHA widget. I can do that using grecaptcha.reset(). It is working fine.
disableSubmitButton(value) {
grecaptcha.reset();
this.isSubmitButtonEnabled = value;
}
But in typescript file I'm getting a compiler Cannot find name 'grecaptcha' which is causing a build error.
How can I resolve this issue.
Just encountered the same problem.
This package has the definition for grecaptcha
npm install --save @types/grecaptcha
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With