在Angular.JS重复:拖放排序NG? [英] Drag and drop sortable ng:repeats in Angular.JS?

查看:135
本文介绍了在Angular.JS重复:拖放排序NG?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是它在所有使用方便jQuery.sortable上NG:重复角JS元素呢?如果重新排序自动传播的项目这将是真棒的订购回源阵列。恐怕这两个系统虽然会打。有没有更好的方式来做到这一点?

Is it at all easy to use jQuery.sortable on ng:repeat elements in Angular JS? It would be awesome if re-ordering the items automatically propagated that ordering back into the source array. I'm afraid the two systems would fight though. Is there a better way to do this?

推荐答案

角UI有一个排序指令,点击这里演示

Angular UI has a sortable directive,Click Here for Demo

code位于 UI可排序,用法:

Code located at ui-sortable, usage:

<ul ui-sortable ng-model="items">
  <li ng-repeat="item in items">{{ item }}</li>
</ul>

这篇关于在Angular.JS重复:拖放排序NG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆