Hi, as I understand, I need just include 'vcRecaptcha' module into my app. So, now I'm trying to use vc-recaptcha in my component (angular 1.6), after rendering my component, I don't see any error in console and recaptcha interface too. I learn directive code, and found next things:
When validation occurs in removeCreationListener, angular expressions is not parsed.
I mean this
if (key.length !== 40) {
throwNoKeyException();
}
in key will be string callback.captchaKey, callback is name which was assigned in controllerAs, captchaKey - is a attribute which was passed into my component.
If I call vc-recaptcha not in component, and into key attr passed php variable, first point will work correctly, but recaptcha interface will not build anyway. I learned code deeper and found next thing.
The interpreter can't come into then because variable recaptcha in getRecaptcha method, which calls in method create is undefined. It's undefined because the callback function was not called
var callback = function () {
recaptcha = $window.grecaptcha;
deferred.resolve(recaptcha);
};
I don't have expert skills in angular, and maybe problem on my side, but I write here because I need help.
Thanks.
I want say couple of words more. Promise which getRecaptcha() returns is empty
Interpreter can't call resolve and reject too. I included recaptcha module into webpack bundle, and browser can work with it, so problem in code I think. But I can't be sure it's bug in directive code, or I did mistake where called it.
Call looks like that
<div key="'<?php echo Authorization_model::RECAPTCHA_PUBLIC ?>'" vc-recaptcha></div>
Hi, as I understand, I need just include 'vcRecaptcha' module into my app. So, now I'm trying to use
vc-recaptcha
in my component (angular 1.6), after rendering my component, I don't see any error in console and recaptcha interface too. I learn directive code, and found next things:When validation occurs in
removeCreationListener
, angular expressions is not parsed. I mean thisin key will be string
callback.captchaKey
, callback is name which was assigned incontrollerAs
, captchaKey - is a attribute which was passed into my component.If I call
vc-recaptcha
not in component, and intokey
attr passed php variable, first point will work correctly, but recaptcha interface will not build anyway. I learned code deeper and found next thing. The interpreter can't come intothen
because variablerecaptcha
ingetRecaptcha
method, which calls in method create is undefined. It's undefined because thecallback
function was not calledI don't have expert skills in angular, and maybe problem on my side, but I write here because I need help. Thanks.
I want say couple of words more. Promise which
getRecaptcha()
returns is emptyInterpreter can't call resolve and reject too. I included recaptcha module into webpack bundle, and browser can work with it, so problem in code I think. But I can't be sure it's bug in directive code, or I did mistake where called it.
Call looks like that
<div key="'<?php echo Authorization_model::RECAPTCHA_PUBLIC ?>'" vc-recaptcha></div>