mat-table can't bind dataSource

前端 未结 1 486
死守一世寂寞
死守一世寂寞 2020-12-22 12:40

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

相关标签:
1条回答
  • 2020-12-22 13:05

    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

    0 讨论(0)
提交回复
热议问题