angularjs-dragula icon indicating copy to clipboard operation
angularjs-dragula copied to clipboard

Cannot use dragula on existing directive

Open avargaskun opened this issue 8 years ago • 1 comments

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!

avargaskun avatar Mar 11 '16 03:03 avargaskun

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

atahrijouti avatar Apr 01 '16 07:04 atahrijouti