Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设您有一个每行呈现 3 次的项目列表,例如:
<div ng-repeat="piece in fooService.get()" class="span3">
你希望能够对它们进行排序。我发现的唯一方法是包装:
<div ui-sortable>
哪个有效,但不绑定到模型。
我错过了什么?
您也必须通过ng-model:请参阅下面的小提琴,我发现谷歌搜索:
ng-model
http://jsfiddle.net/g/hKYWr/
编辑 参考: http ://plnkr.co/edit/Bzjruq?p=preview