有谁知道如何使用 ui-sortable 使复选框列表可排序?这是复选框列表:
<div class="controls">
<label ng-repeat="player in playerlist">
<input
type="checkbox"
name="player.firstname"
ng-model="player.value"
> {{player.firstname}}{{player.lastname}}
</label>
<!--<pre>{{playerlist| json}}</pre>-->
</div>
我已经尝试(有点乐观)将 ui-sortable 放入标签标签中,但没有运气......
有什么建议么?
干杯,
克苏多
编辑*
抱歉....没有发布示例模型:)
playerlist = [
{
"firstname": "Mick",
"lastname": "McCarthy",
"_id": "5269409949e375aa0c000005",
"__v": 0,
"value": true
},
{
"__v": 0,
"_id": "5269408f49e375aa0c000004",
"email": "kseudo@gmail.com",
"firstname": "Brian",
"lastname": "Cunningham",
"phonenumber": 833069486,
"value": true
},
{
"firstname": "Bill",
"lastname": "Bops",
"phonenumber": 23456789,
"email": "sdfsdf@werewr.iw",
"_id": "526c011aaa6d6ef40c000003",
"__v": 0,
"value": true
},
{
"firstname": "asdf",
"lastname": "sdf",
"phonenumber": 234,
"email": "sdsdf@sdfsdf.ie",
"_id": "526c01b4aa6d6ef40c000005",
"__v": 0,
"value": false
}
]