Urban Maciej Urban Maciej - 1 year ago 125
AngularJS Question

Sortable not working AngularJS / UI

I'm trying to get my list sortable with AngularUI



<ul ui-sortable ng-model="deals.numer">
<li ng-repeat="deals in list" class="bg-info" style="padding: 5px; margin: 5px;">

is it possible to make this list sortable after adding few new elements to array?

Answer Source

To make you plunker work:

  • Add jquery and jqueryUI as a dependency
  • Add ui.sortable as a module dependency:

    angular.module('myApp', ['ui.sortable']);
  • Replace:

    <ul ui-sortable ng-model="deals.numer">


    <ul ui-sortable ng-model="list">

See plunker

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download