Answers for "on button click open file upload control ionic 5"

0

on button click open file upload control ionic 5

@ViewChild("uploader", {static: true}) uploader: ElementRef<HTMLInputElement>;

popFileChooser(): void {
  this.uploader.nativeElement.click();
}
Posted by: Guest on April-21-2022
0

on button click open file upload control ionic 5

<ion-button (click)="popFileChooser()">pop file chooser</ion-button>
<input type="file" #uploader hidden>
Posted by: Guest on April-21-2022

Browse Popular Code Answers by Language