<input type="file" accept="image/*"> <button>Upload file</button>
You can leverage template reference variable as follows:
<input type="file" accept="image/*" #file> <button (click)="file.click()">Upload file</button>
The corresponding plunkr is here https://plnkr.co/edit/JB4HY0oxEUgXXIht2wAv?p=preview
1.4m articles
1.4m replys
5 comments
57.0k users