This is what I do. Not fully angularish, but at least works
setRecaptcha() {
if (this.recaptchaVerifier && ('clear' in this.recaptchaVerifier)) {
console.log('Clearing recaptcha');
this.recaptchaVerifier.clear();
document.getElementById('recaptcha-container').innerHTML = '<div id=\'send-confirm-button\'></div>';
}
this.recaptchaVerifier = new firebase.default.auth.RecaptchaVerifier('send-confirm-button', {
size: 'invisible',
I noticed I needed to have non-angular control over the DOM. Especially at the page lifecycle events or when verification failed