Innqube/iq-bootstrap-table

View on GitHub
src/app/component-wrapper/src/app/table/table.component.html

Summary

Maintainability
Test Coverage
<table class="table">
    <thead>
    <tr class="header">
        <th *ngFor="let column of columns" [style.width]="column.width + '' + column.widthUnit + ''"
            [class]="column.css">
            <div *ngIf="column.prop !== undefined" class="sortable">
                <a (click)="sort(column.prop)">
                    {{column.name}}
                </a>
                <i class="glyphicon glyphicon-chevron-up icon" *ngIf="getSortDirection(column) === 'asc'"></i>
                <i class="glyphicon glyphicon-chevron-down icon" *ngIf="getSortDirection(column) === 'desc'"></i>
            </div>

            <div *ngIf="column.prop === undefined">
                    <span>
                        {{column.name}}
                    </span>
            </div>
        </th>
    </tr>
    </thead>
    <tbody>
    <ng-template ngFor [ngForOf]="resultsPage.results" [ngForTemplate]="rows"></ng-template>
    </tbody>
</table>
<ngx-iq-footer [resultsPage]="resultsPage"
               [currentPage]="currentPage"
               (onPageClicked)="onPageClicked($event)"
               [footerLegend]="footerLegend"></ngx-iq-footer>