Touch-enabled Sortable Component For Angular – ngx-hm-sortable

Author: ZouYouShun
Publish Date:
Official Page: Go to website
Views Total: 381
License: MIT

Description:

An Angular 5+ drag’n’drop sortable component that supports server-side rendering.

Installation:

# NPM
$ npm install ngx-hm-sortable --save

Usage:

<table>
  <tbody
    [ngx-hm-sortable]="list"
    elms-selector=".item"
    move-selector=".drag"
    selected-class="color-blue"
    moving-class="color-red"
    (sort-complete)="complete($event)">
    <tr>
      <th>sortable</th>
      <th>number</th>
    </tr>
    <tr *ngFor="let item of list; let i = index;" [attr.index]="i" class="item">
      <td>
        <span class="drag">dragMe!</span>
      </td>
      <td>{{item}}</td>
    </tr>
  </tbody>
</table>

Preview:

ngx-hm-sortable

Leave a Reply