Решение, которое вы ищете, это нумерация страниц, здесь
table-pagination.component.html
<table class="table" #tableEl="mdbTable" class="z-depth-1">
<thead>
<tr>
<th scope="col">hash</th>
<th scope="col">size</th>
<th scope="col">time</th>
<th scope="col"></th>
</tr>
</thead>
<tbody *ngFor="let data of json; let i = index">
<tr>
<td *ngIf="i+1 >= mdbTablePagination.firstItemIndex && i < mdbTablePagination.lastItemIndex">{{data.hash}}</td>
<td *ngIf="i+1 >= mdbTablePagination.firstItemIndex && i < mdbTablePagination.lastItemIndex">{{data.size}}</td>
<td *ngIf="i+1 >= mdbTablePagination.firstItemIndex && i < mdbTablePagination.lastItemIndex">{{data.time}}</td>
<td><button class="btn btn-primary" (click)="onUpdateClick(data.hash , data.size, data.time)">Update</button></td>
</tr>
</tbody>
<tfoot class="grey lighten-5 w-100">
<tr>
<td colspan="4">
<mdb-table-pagination [tableEl]="tableEl" [searchDataSource]="elements"></mdb-table-pagination>
</td>
</tr>
</tfoot>
table-pagination.component.ts
import { MdbTablePaginationComponent, MdbTableDirective } from 'PATH-TO-MDB-ANGULAR-HERE';
import { Component, OnInit, ViewChild, HostListener, AfterViewInit, ChangeDetectorRef } from '@angular/core';
@Component({
selector: 'table-pagination',
templateUrl: './table-pagination.component.html',
styleUrls: ['./table-pagination.component.scss']
})
export class TablePaginationComponent implements OnInit, AfterViewInit {
@ViewChild(MdbTablePaginationComponent) mdbTablePagination: MdbTablePaginationComponent;
@ViewChild(MdbTableDirective) mdbTable: MdbTableDirective
json: any = [];
previous: any = [];
constructor(private cdRef: ChangeDetectorRef) { }
ngOnInit() {
this.mdbTable.setDataSource(this.json);
this.json = this.mdbTable.getDataSource();
this.previous = this.mdbTable.getDataSource();
}
ngAfterViewInit() {
this.mdbTablePagination.setMaxVisibleItemsNumberTo(5);
this.mdbTablePagination.calculateFirstItemIndex();
this.mdbTablePagination.calculateLastItemIndex();
this.cdRef.detectChanges();
}
}
Для более подробной информации: https://mdbootstrap.com/docs/angular/tables/pagination/