I have a problem when try to put a lot of data in mattabledatasource, I want at least to display a loader but I don't know when data is already set. I try to use a promise like that : return new Promise(resolve => { this.infos.map(info => { info.members.map(member => { member.contacts.map(contact => { dataSource.push({ contact, member }); }); }); }); this.dataSource = new MatTableDataSource(dataSource); resolve(); }); But it is not working, just my table is freezing 10 seconds. How I can know when all maps + set data source is done ? Continue reading...