Skip to content

vepasto/angular-no-captcha-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-no-captcha

Angular.JS wrapper for Google's No CAPTCHA reCAPTCHA. See demo at http://codedistillery.github.io/angular-no-captcha/

Prerequisites

  1. Sign up for an API key at https://www.google.com/recaptcha/admin#createsite.

  2. Check documentation for No CAPTCHA reCAPTCHA at https://developers.google.com/recaptcha/intro.

Usage

  1. Install package via bower and save it as a project dependency

    $ bower install angular-no-captcha --save
    
  2. Include noCAPTCHA script

    <script src="src/angular-no-captcha.js"></script>
  3. Add module dependency to your angular module

    var app = angular.module('myApp', ['noCAPTCHA']);
  4. (Optional step) Set default options for noCAPTCHA

    angular.module('myApp')
      .config(['noCAPTCHAProvider', function (noCaptchaProvider) {
        noCaptchaProvider.setSiteKey('<your site key>');
        noCaptchaProvider.setTheme('dark');
      }
    ]);
  5. Finally add noCaptcha element to your form

    <no-captcha
        g-recaptcha-response="gRecaptchaResponse"
        theme='light'
        control="noCaptchaControl"
        site-key="<your site key>">
    </no-captcha>

no-captcha element parameters

Param Type Details
g-recaptcha-response Expression Bind reCAPTCHA response token
theme String {light | dark} Optional. The color theme of the widget. Can be set also in config
site-key String Optional. Your site key. Can be set also in config
control Expression Optional. Object where reset-function will be injected
expired-callback Expression Optional. Callback for expired event

Example

  1. Add your API key to example/index.html
  2. Run Server $ node example/server.js

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published