DethAriel/ng-recaptcha

The recaptcha badge persists

Closed this issue · 3 comments

Summary

I'm submitting a:

  • bug report
  • feature request
  • question / support request
  • other

Description

I am building an app using Angular and Ionic. I have implemented a register component using ng-recaptcha, but my problem is the badge persists when the user navigates to another component.

If I go to the register page, I get registered then the app redirects to the login page but the recaptcha badge is still there.

Same problem here. Is there a solution?

Hey folks! You can refer to this section in the README. Cheers!

Same problem, this is what I found:

ngOnDestroy() {
const element = document.getElementsByClassName('grecaptcha-badge')[0] as HTMLElement;
if (element) {
element.style.visibility = 'hidden';
}
}

but then if you go back to the login form and you have not refreshed you need to show it by doing visibility = 'visible' onInit