<input pInputText #fileInputCarAccident type="file" accept=".docx,image/*" />
@ViewChild('fileInputCarAccident') fileInputCarAccident: ElementRef;
let fica: HTMLInputElement = this.fileInputCarAccident.nativeElement;Hi Adnan,
I’m missing some context here, So I’m guessing here that your fileInputCarAccident is inside a structural directive (*ngIf, *ngFor). That means it is not visible to the component when it’s getting initialized.
Is that the case?
Regards
Sander