Angular: How to get element ID of item on which other element has been dropped

593 views Asked by At

I have two unordered list with draggable <li> items. I want the <li> items to be draggable and droppable on the <li> items of the other list and get both the id of the dragged <li> item and the id of the <li> item on which the dragged one has been dropped. currently I can get the element ID of the dragged item by doing thisevent.item.element.nativeElement.id. is it possible to get the id of the element on which the item has been dropped?

1

There are 1 answers

0
Bartvandee On

I think you could use the same event and then use event.target