This is a migrated thread and some comments may be shown as answers.

Angular Drag and Drop container

3 Answers 181 Views
Drag and Drop
This is a migrated thread and some comments may be shown as answers.
Kelly
Top achievements
Rank 1
Kelly asked on 27 Oct 2014, 01:58 PM
How do I create a container for a draggable widget using angular?

3 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 29 Oct 2014, 08:46 AM
Hi,

do you refer to this feature? Something like this should work, just like all AngularJS configuration options: 

<div id="container"> <div kendo-draggable k-container="containerRef" ...
 
<script>
...
$scope.containerRef = $("#container");
</script>


Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Kelly
Top achievements
Rank 1
answered on 29 Oct 2014, 12:08 PM
Yes but is there a way to do it using angular constructs and not jQuery. I have an ng-repeat with multiple draggable items in each so I can't really use the jQuery selector. I need it to be bound by it's scope. Here's an example but creating 2 areas manually as opposed to a ng-repeat.
0
Petyo
Telerik team
answered on 31 Oct 2014, 08:26 AM
Hi Kelly,

the "cleanest" way to do that would be through a directive - something like this

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Drag and Drop
Asked by
Kelly
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Kelly
Top achievements
Rank 1
Share this question
or