From 50eab742ba3c1ac254c92091b9933ce36c2c4a30 Mon Sep 17 00:00:00 2001 From: NicoGaspa Date: Tue, 19 Jun 2018 23:27:23 +0200 Subject: [PATCH] Fixed angular nested ng-repeat example --- index.html | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 0abf3ee..19d7f8b 100644 --- a/index.html +++ b/index.html @@ -255,12 +255,38 @@

Drag and drop so simple it hurts

-
+
+ +
+      
+<div class='wrapper'>
+  <div class='container' ng-repeat="group in groups" dragula="'nested-bag'" dragula-model="group.items" dragula-scope="$parent">
+	<div ng-repeat='item in group.items' ng-bind='item.name'></div>
+  </div>
+</div>
+
+app.controller('NestedRepeatCtrl', ['$scope',
+  function ($scope) {
+    $scope.groups = [
+      {
+        name: 'Group A',
+        items: [{name: 'Item A'},{name: 'Item B'},{name: 'Item C'},{name: 'Item D'}]
+      },
+      {
+        name: 'Group B',
+        items: [{name: 'Item 1'},{name: 'Item 2'},{name: 'Item 3'},{name: 'Item 4'}]
+      }
+    ];
+  }
+])
+      
+    
+

Get it on GitHub! bevacqua/angularjs-dragula