Nick Retallack Nick Retallack - 5 months ago 26
AngularJS Question

Drag and drop sortable ng:repeats in Angular.JS?

Is it at all easy to use

elements in AngularJS?

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?


Angular UI has a sortable directive,Click Here for Demo

Code located at ui-sortable, usage:

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