Property 'files' does not exist on type 'EventTarget' error in typescript

后端 未结 7 741
迷失自我
迷失自我 2020-11-30 09:50

I am trying to access the value of the input file from my ionic 2 application but still I\'m facing the issue of property files does not exist on type \'EventTarget\'. As it

7条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 10:26

    I have found that:

    
    

    and

      or (ionChange)
    

    does not handle the event in the same way. Therefore event.target consists of different parameters.

    I therefore did not use the ion-input tag, but the normal angular tag with the (change)="upload($event)" trigger.

    It worked for me on Ionic 4.

提交回复
热议问题