I am trying to show the image which i have selected from input type file.
Here every thing is working fine, I also got the output.
but the problem is in component try to get the value of input file, particularly using .file method, it show error( error TS2339: Property 'files' does not exist on type 'HTMLElement'). in editor also it shows like "Property does not exist on type HTMLElement".
coding is working fine, still this error is showing.
HTML page
<input type="file" id="fileupload" class="fileupload" name="Image" (change)="showimgupload()" accept="image/*" multiple="true">
Component
showimgupload(){
var img_file = document.getElementById("fileupload") ;
var imgTemp = img_file.files //here in .files shows error
console.log(imgTemp);
}
I try this the following:
1) : HTMLElement 2) as HTMLMediaElement
still it is not working.so any one can help me to remove this error.