aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/datatable/datatable.component.html
blob: 2c469ecc45ec5f39fbd0bcfc40dd3d6628dd30b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<div *ngIf="data">
    <div class="table-responsive">
        <table *ngIf="hasHeader" class="table table-bordered table-light mt-4">
            <thead>
                <tr>
                    <th *ngFor="let item of data[0]; let i = index">{{item}}</th>
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let row of data | slice:1:11">
                    <td *ngFor="let col of row">{{col}}</td>
                </tr>
            </tbody>
        </table>

        <table *ngIf="data.length > 0 && !hasHeader" class="table table-bordered table-light mt-4">
            <tbody>
                <tr *ngFor="let row of data | slice:0:10">
                    <td *ngFor="let col of row">{{col}}</td>
                </tr>
            </tbody>
        </table>
    </div>

    <div id="info">
        . . . <br>
        {{data.length}} x {{data[0].length}}
    </div>
</div>