Angular Drag and Drop container

4 posts, 0 answers
  1. Kelly
    Kelly avatar
    28 posts
    Member since:
    Oct 2012

    Posted 27 Oct 2014 Link to this post

    How do I create a container for a draggable widget using angular?
  2. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 29 Oct 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Kelly
    Kelly avatar
    28 posts
    Member since:
    Oct 2012

    Posted 29 Oct 2014 in reply to Petyo Link to this post

    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.
  5. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 31 Oct 2014 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready