Closed minhtranite closed 10 years ago
Hi you may want to have a look at http://ngmodules.org/modules/angular-ui-tree
I know angular-ui-tree but that is not what I need. You can watch a video recording of my screen to understand more of what I need. Thanks! http://youtu.be/LVq8YwqdMdk
Hi If I'm not wrong what you are trying is to do Sorting with in another sorting . This should be doable. Please try with Isolate scope.
You can see example code here http://plnkr.co/edit/GOKSHr. Please make it run.(Keep use "two way binding" for items).
This might be late, but I needed to do nested sortables in my current project, and this is how I did it :
http://plnkr.co/edit/LtQueIa0llGOKYyS4lWX?p=preview.
I confirm this is working fine. You can close this.
Thank!
Here is a solution, without angular-ui-tree.
Actually ng-sortable supports nested data very well, the problem is: as-sortable-item-handle doesn't.
So, the really problem is: element with "as-sortable-item-handle" can't be the container of "as-sortable" and "as-sortable-item".
Then the solution is simple: Set a title bar for all the nodes you want to drag. And set as-sortable-item-handle on this title bar. Like this:
<div this-is-level-1>
<div>title bar</div>
<div this-is-level-2>
<div>title bar</div>
<div this-is-level-3>
.....
</div>
</div>
</div>
In this way, no matter how many levels your nested data has, your as-sortable and as-sortable-item will never be under an "as-sortable-item-handle "
Hi guys! How to make 'ng-sortable' work with nested sortable or disable inner sortable.