2017-12-18 27 views
0

각도 2 구성 요소에서 보이지 않는 recaptcha를 통합하려고합니다. 여기 각도 구성 요소가있는 보이지 않는 reCAPTCHA 통합

는 login.component.html

<button type="submit" class="g-recaptcha" data-sitekey="<Site-Key>" data-callback='onsubmit'> Log On </button> 

내 코드입니다 그리고 login.component.ts은 다음과 방법 onsubmit 있습니다

 onsubmit() { 
    console.log("In onsubmit method"); 
} 

내가 호출 할 때 다음과 같은 오류를 얻고을 내 login.component.ts에서 onsubmit 메소드

및 'g-recaptcha-response'를 얻는 방법 내 login.component.ts.

답변

0

우리는 형태를 확인하는 데 사용하는

당신이 (여기 https://github.com/VividCortex/angular-recaptcha 자세한 내용은) 각도와 같은 각도-reCAPTCHA를 등으로 구글의 reCAPTCHA를 통합하는 데 도움이 할 수있는 플러그인이 있고 그것을 잘 작동합니다.