I have following input tag, I need to set the accept value dynamically using array:
<input #myFile type="file" />
To set the accept properties dynamically i am using view child:
@ViewChild("myFile") myFileRef: ElementRef;
ngAfterViewInit() {
this.myFileRef.nativeElement.accept = ['.pdf','.doc','.docx','.xlsx', '.xls'];
}
This is not working, is it possible using angular or javascript?
[accept]="value"if you want to change it?