V
V
Vitaly Slyusar2019-01-22 10:32:34
JavaScript
Vitaly Slyusar, 2019-01-22 10:32:34

How to do manual list sorting on the front in Angularjs?

There is a list of uploaded files in angularjs,
5c46c5f8e9246069309545.png
I display the name of each selected file so that the user can delete unnecessary ones.

<ul class="upload-file-list">
 <li ng-repeat="file in files"><a ng-click="remove()" style="color: red;">X</a>  {{$index+1}})  {{file.name}}</li>
</ul>

But how to make the user be able to swap the elements of the list, giving them the order.?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shmatuan, 2019-01-22
@shmatuan

Add drag and drop - it will change the order (+ you can add a drag cart to delete) marceljuenemann.github.io/angular-drag-and-drop-li...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question