1.0.4 • Published 7 years ago

ng-table-sort v1.0.4

Weekly downloads
7
License
ISC
Repository
github
Last release
7 years ago

Angular Directive to Sort Data Tables

Install:

    npm install ng-table-sort

Usage:

    /*** app.ts ***/

    ...
    import { TableSortDirective } from 'ng-table-sort/table-sort.directive';

    @NgModule({
      declarations: [
        ...,
        TableSortDirective
      ],
      
    ...
    <!-- template html -->

    <table [relatedData]="data_used_in_the_table">
        <thead>
            <tr>
                <th> Column 1 </th>
                <th> Column 2 </th>
                <th> Column 3 </th>
                ...
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let data of data_used_in_the_table">
                <td>{{data.anything}}</td>
                <td>{{data.could.be.nested}}</td>
                <td>Or text unrelated with the data</td>
                ...
            </tr>
        </tbody>