Remember to import the MatTableModule module and remove the table element show below for reference.
wrong implementation
<table mat-table [dataSource]=”myDataArray”>
...
</table>
correct implementation:
<mat-table [dataSource]="myDataArray">
</mat-table>