ng-hcaptcha
ng-hcaptcha copied to clipboard
Callback running outside NgZone
Hi,
It seems the callback after this.ngHcaptchaService.verify() runs outisde angular's change detection, I have to wrap it inside this.ngZone.run() to make it work, otherwise my page doesn't update correctly.
this.ngHcaptchaService.verify()
.subscribe({
next: (response) => this.zone.run(() =>/* update page */)
});
Would it be possible to make your service run the callback inside angular's zone automatically ?
Hi @NicoBrg-WDG, this will be fixed in 2.3.1.
Thanks for the fix @leNicDev