html5-sortable-angularjs

A directive for angular support sortable list base on pure html5
2 people use it
Author: 2065400?v=2 bachvtuan

HTML5 SORTABLE FOR ANGULARJS

I used sortable which provided by jqueryUI at this link, That's good but it's pretty heavy to use because not just sortable code is included, I just need sortable method, So I decided make sortable items by html5 instead, almost modern browsers support this.
Below is some reference links that help me get an overview before coding this directive.

DEMO LINK

Directive features

  1. Native html5 sortable( jquery no longer required ).
  2. Support sortable which array is given ( pass by ngModel)
  3. You can choose specific handle element on item element.
  4. Offer callback when init directive or after item is dropped.
  5. Auto update sortable DOM when ngmodel is changed or removed sub item.
  6. Cross dropping

How to use

Include html5.sortable to your app

Define any varriable in scope with type is array

Define sortable options

Below is example in template code

If you don't want using option, you can edit to html-sortable="" in template.

LICENSE

MIT

Done

Have fun !

comments powered by Disqus
This page was last updated about 3 years ago.