1

I'm trying to get my list sortable with AngularUI

plunker:

http://plnkr.co/edit/2zbn2rBpnat8lEQZRGd9?p=preview

<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?

1
  • Firstly, you have to add 'ui.sortable' as a module dependency. Commented Oct 4, 2015 at 15:48

1 Answer 1

1

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">
    

    with:

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

See plunker

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.