I'm using an usb card reader with my application to fill an input form. I'm trying to hide it and be able to badge with my card to send the form.
I tried to use
<input hidden type="text" id="cardNumber" formControlName="cardNumber" [(ngModel)]="refresh">
and
<input type="hidden" id="cardNumber" formControlName="cardNumber" [(ngModel)]="refresh">
and
<input type="text" style="display:none" id="cardNumber" formControlName="cardNumber" [(ngModel)]="refresh">
But as soon as the element disappear I'm unable to fill it with the card. I make sure the focus is always present by using
document.getElementById("cardNumber").focus();
I don't understand how angular treats in the DOM all hidden elements? But it looks like I can reach it but not use it.