我正在尝试将后端数据连接到我的dataSource,但一直收到错误消息: error Error: Provided data source did not match an array, Observable, or DataSource export class AdminComponent implements OnInit {
this.dataSource = data;
});
使用角度材料原理图生成一个表时,您将看到一个包含datasource.ts文件的表组件。在这方面,要显示的数据是硬编码的。this.service.getCompanies().subscribe((response) => { });我遇到的问题是在我的在构造数据源类时,这需要一个参数 this.dataSource = new Test