<table mat-table [dataSource]="dataSource" matSort [matSortActive]="sortColumn" [matSortDirection]="sortDirection" matSortDisableClear
    class="crud-table table" style="width: 100%;margin-bottom: 0;">

    <ng-container matColumnDef="identifier">
        <th mat-header-cell *matHeaderCellDef mat-sort-header> Frase
            <mat-icon *ngIf="sortColumn === 'identifier'">
                <i class="fa fa-sort-amount-desc"
                    *ngIf="sortDirection === 'desc'"></i>
                <i class="fa fa-sort-amount-asc"
                    *ngIf="sortDirection === 'asc'"></i>
            </mat-icon> 
        </th>
        <td mat-cell *matCellDef="let element" style="width: 300px;"> {{ (element.identifier.length>30)? (element.identifier | slice:0:30)+'...':(element.identifier) }} </td>
    </ng-container>

    <ng-container matColumnDef="count">
        <th mat-header-cell *matHeaderCellDef mat-sort-header> Ocurrencia 
            <mat-icon *ngIf="sortColumn === 'count'">
                <i class="fa fa-sort-amount-desc"
                    *ngIf="sortDirection === 'desc'"></i>
                <i class="fa fa-sort-amount-asc"
                    *ngIf="sortDirection === 'asc'"></i>
            </mat-icon> 
        </th>
        <td mat-cell *matCellDef="let element"> {{element.count}} </td>
    </ng-container>

    <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
    <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>

</table>
<!-- [pageSize]="pagination?.itemsPerPage"  -->
<mat-paginator #paginator [length]="pagination?.totalItems" [pageSize]="pagination?.itemsPerPage"
    [pageSizeOptions]="[5]" [pageIndex]="pagination?.currentPage" style="width: 100%; 
    
    ">
</mat-paginator>