AngularJs: How to check for changes in file input fields?

前端 未结 15 1151
傲寒
傲寒 2020-11-22 09:06

I am new to angular. I am trying to read the uploaded file path from HTML \'file\' field whenever a \'change\' happens on this field. If i use \'onChange\' it works but when

15条回答
  •  伪装坚强ぢ
    2020-11-22 09:45

    You can simply add the below code in onchange and it will detect change. you can write a function on X click or something to remove file data..

    document.getElementById(id).value = "";
    

提交回复
热议问题