logicbomb / lvlDragDrop

Native AngularJS drag and drop directive
http://jasonturim.wordpress.com/2013/09/01/angularjs-drag-and-drop/
MIT License
186 stars 92 forks source link

AngularJS 1.3 support #14

Open kevinrenskers opened 9 years ago

kevinrenskers commented 9 years ago

AngularJS is now giving this error: "Referencing DOM nodes in Angular expressions is disallowed!", because of this: on-drop="controller.dropped(dragEl, dropEl)".

Is there a quick fix for this?

logicbomb commented 9 years ago

Yeah, move the code controller.dropped... into a function hanging off of $scope and update the html. It'd be great if you could issue a pull-request with that change.

kevinrenskers commented 9 years ago

Eh sorry this isn't really clear to me. I think the "update the html" is the main problem that I'm asking a solution for ;) I'm asking for help, so I'm not really in a position to issue any PR (yet).

kevinrenskers commented 9 years ago

My quick hack is to give the element id's as parameters as opposed to the elements themselves. Let my own function handle the document.getElementById logic. Not sure if this is the best solution, probably not, but works for now.

logicbomb commented 9 years ago

Whatever works.

It's been a while since I've used this, but it seems that somewhere there is an HTML element with the attribute on-drop that is referencing the DOM elements dragEl and dropEl, which is what angular appears to be complaining about.

On Tue, Oct 14, 2014 at 10:02 AM, Kevin Renskers notifications@github.com wrote:

Eh sorry this isn't really clear to me. I think the "update the html" is the main problem that I'm asking a solution for ;) I'm asking for help, so I'm not really in a position to issue any PR (yet).

— Reply to this email directly or view it on GitHub https://github.com/logicbomb/lvlDragDrop/issues/14#issuecomment-59048982 .