CodeDistillery / angular-no-captcha

Angular.JS wrapper for Google's No CAPTCHA reCAPTCHA
http://codedistillery.github.io/angular-no-captcha/
MIT License
42 stars 21 forks source link

Adjust scope.control to allow for non-defined object #17

Closed richiepreece closed 9 years ago

richiepreece commented 9 years ago

Currently, in order to have reset injected into your control object, you must do the following:

HTML
<no-captcha control="control"></no-captcha>

CONTROLLER
$scope.control = {};

*elsewhere*.
$scope.reset();

This allows for you to do the following:

HTML
<no-captcha control="control"></no-captcha>

CONTROLLER
$scope.reset();

Essentially, it makes priming the control as an object optional.