我正在尝试将后端数据连接到我的dataSource,但一直收到错误消息: error Error: Provided data source did not match an array, Observable, or DataSource export class AdminComponent implements OnInit {
this.dataSource = data;
});
我使用一个角度材料数据表来显示可以添加到的对象列表。当将对象添加到数据源时,页面索引会中断并显示为负值。解决这个问题的唯一方法是将材料分页器的页面索引重置为0。下面是一个示例:private refreshTable() {
// first we update the length of the paginator似乎很少有更新角材料数据表的例子,甚至很