Removing latest item from drop list

Published

I am working on angular drag and drop. My Code is as follows

https://stackblitz.com/edit/angular-cdk-drag-drop-higfzm?file=app/cdk-drag-drop-connected-sorting-example.ts

The item which I am dropping will always be dropped at end of done list. I want to have a "X" mark on latest item dropped(suppose user drags and drops item1 then "X" should be on items1 and if user drags and drops item2 then "X" should be only on item2) so that if user wishes user can click on "X" and item is removed from done list and get back to the "TO DO" list again.

Source: Angular Questions

Published
Categorized as angular, angular10, angular8, angular9, drag-and-drop Tagged , , , ,

Answers

The goal is to store the index of last element and then apply logic in the template
Solution


Edward Donnelly

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq