Open contactsandygo opened 6 years ago
Aaa.. I have found better solution.. I can clone the element via jQlite which is part of angularjs core and it fully implements jQuery clone which has ability to clone event handlers too.. so I will add this feature in next release.. I will let you know here.
Thank you for taking up as feature request.
Yeah.. but it is a bit more complicated as I thought. jQLite does not attach the listeners to the cloned element, as I thought.. so I will look at this later. :/
I have support for JQuery in my project so I will use its clone method only issue with that is probably after registering new handler scope data would be still pointing towards original element as I wont be able to create fresh scope for cloned element with new values on droped event unless I use $compile service to create new element on fly and instead of attaching dragular cloned element use compiled element so visually it would appear as drag drop operation with source element intact.
Thanks for your support.
Yes, for now you need some workaround.. I will try to find some way how to list all events attached to element.
I am exploring dragular with following option copy: true, copySortSource: true Events registered on original elements are not getting copied with these option.Please what approach can be used so that along with dom and scope, events also should get copied in this mode. There are two issues 1) Cloned element across containers does not have registered event of original element. 2) Within same container element loose registered events
Please refer plunker created by me for these problems https://plnkr.co/edit/geahyNnuZxFsuMLzFVER?p=preview
Regards, San