diff --git a/index.html b/index.html index 76a17b5..9c84525 100644 --- a/index.html +++ b/index.html @@ -76,6 +76,7 @@
Drag and drop the parents and children
+You're not fit to be a mother!
+Parents: {{parents|json}}
+
+<script>
+$scope.parents = [
+ { name: 'Anna',
+ children: ['Alvin', 'Becky' ,'Charlie'] },
+ { name: 'Barney',
+ children: ['Dorothy', 'Eric'] },
+ { name: 'Chris',
+ children: ['Frank', 'Gary', 'Henry'] }
+];
+</script>
+
+<ul ui-sortable ng-model="parents">
+ <li ng-repeat="parent in parents">
+ <h3>{{parent.name}}</h3>
+ <ul class="children"
+ ui-sortable="{connectWith:'.children'}"
+ ng-model="parent.children">
+ <li ng-repeat="child in parent.children">
+ {{child}}
+ </li>
+ </ul>
+ </li>
+</ul>
+ Static Items: {{items|json}}
+ +<script> +$scope.items = ['One', 'Two', 'Three']; +</script> + +<ul ng-model="items" ui-sortable> + <li>First</li> + <li>Second</li> + <li>Third</li> +</ul>+