Angular.JS wrapper for Google's No CAPTCHA reCAPTCHA. See demo at http://codedistillery.github.io/angular-no-captcha/
Sign up for an API key at https://www.google.com/recaptcha/admin#createsite.
Check documentation for No CAPTCHA reCAPTCHA at https://developers.google.com/recaptcha/intro.
Install package via bower and save it as a project dependency
$ bower install angular-no-captcha --save
Include noCAPTCHA script
<script src="https://github.com/CodeDistillery/angular-no-captcha/raw/master/src/angular-no-captcha.js"></script>
Add module dependency to your angular module
var app = angular.module('myApp', ['noCAPTCHA']);
(Optional step) Set default options for noCAPTCHA
angular.module('myApp')
.config(['noCAPTCHAProvider', function (noCaptchaProvider) {
noCaptchaProvider.setSiteKey('<your site key>');
noCaptchaProvider.setTheme('dark');
}
]);
Finally add noCaptcha element to your form
<no-captcha
g-recaptcha-response="gRecaptchaResponse"
theme='light'
control="noCaptchaControl"
site-key="<your site key>">
</no-captcha>
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 |
size | String {normal | compact} | Optional. The size of the widget. Can be set also in config |
site-key | String | Optional. Your site key. Can be set also in config |
stoken | String | Optional. Your secure token. Can only be set in your element. |
language | String | Optional. Forces the widget to render in a specific language. Can only be set in config. |
control | Expression | Optional. Object where reset-function will be injected |
expired-callback | Expression | Optional. Callback for expired event |
API key
to example/index.html
$ node example/server.js
$ npm test
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]