Tuesday, April 2, 2019

Empty out the selection in a file type input in an Angular 7 application.

It's as easy as you think it is to zero this out. Assuming...

@ViewChild('uploadControl') uploadControl: ElementRef<HTMLInputElement>;

 
 

...then:

this.uploadControl.nativeElement.value = '';

No comments:

Post a Comment