bevacqua / angularjs-dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/angularjs-dragula
MIT License
509 stars 110 forks source link

Copy function isn't working #120

Open petermiles opened 6 years ago

petermiles commented 6 years ago

Here is some provided code.

https://plnkr.co/edit/F6yC7DTSKIrsARThvedn?p=preview

I'm trying to enable the dragula COPY function when I drag a "recipe" into a table.

When I try to do it, I get the error Cannot read property '0' of undefined at applyDrop (service.js:80)

How can I fix this? i've spent so long on it.

nicosouv commented 6 years ago

I changed you dragula attributes to : ='"bag-one"' and it worked.

If you look at their example, the attribute is encapsulated in single and double quote:

<div dragula='"fifth-bag"'></div>

Hope this helps.