简体   繁体   中英

capture event if drop-drop has been done on the HTML page

I work on Angular4 and 5 and I have a functionality to upload a file in the table. So, on click of an Add button a pop-up will appear and through that pop-up we can browse or drag-drop a file/files.

My requirement is as soon as the drag-drop/browse is done I have to make a service call. So is there any way I can capture an event if the files has been browsed/drag-droppped? If so please guide me. IS there any other way I can achieve this?

PS: This upload pop-up and the Add button is 3rd party, I cannot make any change in their component/HTML. The thing I am trying to do is to capture the event, if there is any other way please suggest.

HTML

<button>Add Files</button>
<3rd-party-upload-popup></3rd-party-upload-popup>

Can you please make a plunker for the same, specifying where actually you need the event. Otherwise what i understood is that when you drop something, you may require an event. For this in Angular drop event is there. Also you may want to look at sortableJs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM