Reputation: 369
Angular material data is not rendering the data even though datasource has correct data to be displayed
Note: Paginator is working correctly according to the datasource
this.assignmentDataSource = new MatTableDataSource<Assignment>(assignmentList); //assignmentList has data loaded
this.assignmentDataSource.paginator = this.paginator;
console.log(this.assignmentDataSource);
I want to know why the data is not rendering to the view
Thanks !!!
Upvotes: 1
Views: 804
Reputation: 1640
There have matColumnDef
directives, and this directive try to get the key of an object. But you define a bad key, and the dataTable
cant read the objects. Try to add the excepted matColumnDef
values.
Upvotes: 1