node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey ยป


Angular2 Google Recaptcha

The sources for this package are in ( repo. Please file issues and pull requests against that repo.

Live Demo

Live Demo Site OR Live Demo Site ## Usage npm install angular2-google-recaptcha ### 1. Index.html page include following script

    <script src=""
           async defer>

2.component file use like below

    import {Component} from 'angular2/core';
    import {GoogleRecaptchaDirective} from '../directives/googlerecaptcha.directive';
        selector : 'my-app',
        directives: [GoogleRecaptchaDirective],
        template:  `
            <div  (setVerified) = "setVerified($event)" googlerecaptcha [siteKey] = "siteKey" [theme] = 'theme' ></div>
    export class AppComponent {
        public verified : any;   
        public siteKey: string = "sitekey";//example: 6LdEnxQTfkdldc-Wa6iKZSelks823exsdcjX7A-N
        public theme: string = "light";//you can give any google themes light or dark
        setVerified(data) {
            console.log(data) // data will return true while successfully verified