Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Repository files navigation

angular-no-captcha

Join the chat at https://gitter.im/CodeDistillery/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

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

    varapp=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-captchag-recaptcha-response="gRecaptchaResponse"
    theme='light'
    control="noCaptchaControl"
    site-key="<your site key>"></no-captcha>

no-captcha parameters

ParamTypeDetails
g-recaptcha-responseExpressionBind reCAPTCHA response token
themeString {light | dark}Optional. The color theme of the widget. Can be set also in config
sizeString {normal | compact}Optional. The size of the widget. Can be set also in config
site-keyStringOptional. Your site key. Can be set also in config
stokenStringOptional. Your secure token. Can only be set in your element.
languageStringOptional. Forces the widget to render in a specific language. Can only be set in config.
controlExpressionOptional. Object where reset-function will be injected
expired-callbackExpressionOptional. Callback for expired event

Example

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

Developing

Tests

$ npm test

Release

Release task builds the project and releases a new version to GitHub

You must set the environment variable GITHUB_ACCESS_TOKEN=<your-token>

$ grunt release[:patch | :minor | :major]

About

Angular.JS wrapper for Google's No CAPTCHA reCAPTCHA

Resources

Stars

40 stars

Watchers

12 watching

Forks

Releases

Packages

Used by

Contributors

Languages