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

models are lost when inside ng-if #62

Closed atahrijouti closed 3 years ago

atahrijouti commented 8 years ago

Hi there,

In the following example I have to sections :

the templates section is used to build the table and fill it with items. templates are either Rows, or Items.

if the table contains no rows, I do not want to have the template items on the DOM altogether. so I am wrapping the template area with ngif. trouble is, dragula-model won't reflect what really is in the templates model when you drag an item from the templates section.

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

kruny1001 commented 8 years ago

"ng-if" creates an isolate scope. If you intend to show or hide a target element, use ng-show and ng-hide.

atahrijouti commented 8 years ago

@kruny1001 I know what ngif dose and what ngshow does. i want to know if i could make it work with ngif