Struggling with creating a file drag and drop upload feature. I've set up the div container with dragenter, dragleave, and drop events using HostListener in an Angular Directive. The dragenter and dragleave events are functioning correctly, but I'm facing an issue with event.preventDefault() not working in the drop event. Here is my event code:
@HostListener('drop', ['$event']) onDrop = (event): void => {
event.preventDefault();
}
I've also attempted to include the event using
(drop)="function($event)"
within the HTML DOM, but that approach didn't yield any results.