bevacqua / angularjs-dragula

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

Cannot use dragula on existing directive #57

Open avargaskun opened 8 years ago

avargaskun commented 8 years ago

Thanks for the great drag-drop framework!

I ran into an issue while integrating it into my project and I thought worth opening an issue.

I initially wanted to apply the dragula directive to an element containing another directive but got an error. Turns out dragula requires a new/isolated scope and thus cannot be applied to elements containing another directive with new/isolated scope. A workaround I'm trying out myself is to read the attributes inside link() and use $parse to re-hydrate their value. So far it appears to be working.

Thanks again!

atahrijouti commented 8 years ago

You could just put the dragula bag on a div inside your existing directive