I am trying to use angular material table MatTableModule
, but when passing the data to the [dataSource]
input I am getting the Can\'t bind to
The problem was that the material angular version I'm using is v5.2.4, so the template should be <mat-table #table [dataSource]="dataSource"></mat-table>
instead of <table mat-table #table [dataSource]="dataSource"></table>
according to Angular material v5.2.4 documentation.
https://v5.material.angular.io/components/table/overview#1-write-your-mat-table-and-provide-data