In my Angular2 application, I have created a directive for an input field. To prevent paste or Ctrl+V within the host element of this directive, I used the following code which is functioning flawlessly:
@HostListener('paste', ['$event']) blockPaste(e: KeyboardEvent) {
e.preventDefault();
}
Now, I am also looking to disable the Drop event within that same host. How can I achieve this?