Ajout de loading sur le chargement
de l'application + lors du chargement des composants
This commit is contained in:
@@ -44,9 +44,11 @@ export class ListOfGearsComponent implements OnInit {
|
||||
|
||||
getListOfGears() {
|
||||
this.serviceApi.getListOfGears().subscribe(data => {
|
||||
this.dataSourceTable = new MatTableDataSource<GearResp>(data);
|
||||
this.dataSourceTable.paginator = this.paginator;
|
||||
this.resultsLength = data.length;
|
||||
setTimeout(() => {
|
||||
this.dataSourceTable = new MatTableDataSource<GearResp>(data);
|
||||
this.dataSourceTable.paginator = this.paginator;
|
||||
this.resultsLength = data.length;
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user