Ajout d'un message de chargement

This commit is contained in:
Sébastien André
2019-11-24 18:39:18 +01:00
parent 3d25119757
commit bab92186dd
9 changed files with 143 additions and 122 deletions

View File

@@ -1,37 +1,40 @@
<table mat-table [dataSource]="dataSourceTable">
<ng-container matColumnDef="id">
<th mat-header-cell *matHeaderCellDef>ID</th>
<td mat-cell *matCellDef="let element">{{element.id}}</td>
</ng-container>
<div *ngIf="dataSourceTable != null else loading">
<table mat-table [dataSource]="dataSourceTable">
<ng-container matColumnDef="id">
<th mat-header-cell *matHeaderCellDef>ID</th>
<td mat-cell *matCellDef="let element">{{element.id}}</td>
</ng-container>
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>Name</th>
<td mat-cell *matCellDef="let element">{{element.name}} <a href='http://{{element.website}}'>ici</a></td>
</ng-container>
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>Name</th>
<td mat-cell *matCellDef="let element">{{element.name}} <a href='http://{{element.website}}'>ici</a></td>
</ng-container>
<ng-container matColumnDef="latitude">
<th mat-header-cell *matHeaderCellDef>Latitude</th>
<td mat-cell *matCellDef="let element">{{element.latitude}}</td>
</ng-container>
<ng-container matColumnDef="longitude">
<th mat-header-cell *matHeaderCellDef>Longitude</th>
<td mat-cell *matCellDef="let element">{{element.longitude}}</td>
</ng-container>
<ng-container matColumnDef="latitude">
<th mat-header-cell *matHeaderCellDef>Latitude</th>
<td mat-cell *matCellDef="let element">{{element.latitude}}</td>
</ng-container>
<ng-container matColumnDef="longitude">
<th mat-header-cell *matHeaderCellDef>Longitude</th>
<td mat-cell *matCellDef="let element">{{element.longitude}}</td>
</ng-container>
<ng-container matColumnDef="address">
<th mat-header-cell *matHeaderCellDef>Address</th>
<td mat-cell *matCellDef="let element"><span [innerHTML]="element.address"></span></td>
</ng-container>
<ng-container matColumnDef="email">
<th mat-header-cell *matHeaderCellDef>E-mail</th>
<td mat-cell *matCellDef="let element">{{element.email}}</td>
</ng-container>
<ng-container matColumnDef="type">
<th mat-header-cell *matHeaderCellDef>Type</th>
<td mat-cell *matCellDef="let element">{{element.type}}</td>
</ng-container>
<ng-container matColumnDef="address">
<th mat-header-cell *matHeaderCellDef>Address</th>
<td mat-cell *matCellDef="let element"><span [innerHTML]="element.address"></span></td>
</ng-container>
<ng-container matColumnDef="email">
<th mat-header-cell *matHeaderCellDef>E-mail</th>
<td mat-cell *matCellDef="let element">{{element.email}}</td>
</ng-container>
<ng-container matColumnDef="type">
<th mat-header-cell *matHeaderCellDef>Type</th>
<td mat-cell *matCellDef="let element">{{element.type}}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator [length]="resultsLength" [pageSize]="20"></mat-paginator>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator [length]="resultsLength" [pageSize]="20"></mat-paginator>
</div>
<ng-template #loading>Waiting...</ng-template>