Google’s ReCaptcha not appearing?

Recently I had a weird problem that Recaptcha has not rendered at all in most of the cases. It seemed random however, but most of the cases it failed. Later I’ve figured out, that it was caused by some network race conditions. The solution was then quite straightforwad: manual initialization of ReCaptcha after the script has been loaded. I’ve wrapped the whole solution as Angular directive, so everything is in one place. Feel free to use it .directive(‘recaptcha’, [‘$window’, function ($window) { // // The actual directive definition object // return { restrict: ‘AE’, scope: { sitekey: ‘=’ }, template: ‘<script …

Continue Reading