How to handle google recaptcha v3 in angular?

  Kiến thức lập trình

Recently I’ve been working in an angular app where I need to use google recaptcha V3 in its landing page. I’ve found the documentation and a example of it’s implementation: https://www.npmjs.com/package/ng-recaptcha#example-basic-v3
However, I’ve found myself running in circles with this development because of two problems:

  • In the example presented by the documentation, there is no element in the html file that I can use to use o move the recaptcha element. All I have is this example:
    Just the call to v3 service
    Where it is only the button that activates the functionality.

So I have visuals like this:
There is a button above the component

  • Another problem I find, as I don’t specify the html element I’m working with, google recaptcha component applies to all the pages inside my app, even if I want it to appear only in a specific one.

I hope put my question clear. Thanks in advance for your help.

I try to create html elements with a similar class as the referenced in elements inspector. But there is no change.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT