mat-table, how to use it?
See original GitHub issueHi,
On this page: Angular Table documentation
The documentation is still with md-table instead of mat-table.
Then, I tried to use this documentation: Angular CDK documentation
But cdk-table is not recognized too.
So I tried to adapt the code:
<mat-table #table [dataSource]="sampleDataSource">
<ng-container matColumnDef="value">
<mat-header-cell *matHeaderCellDef> Value </mat-header-cell>
<mat-cell *matCellDef="let sample"> {{sample.value}} </mat-cell>
</ng-container>
</mat-table>
But I have an error:
ERROR TypeError: headerDef is undefined
Google didnt help me to find a solution: GoogleSearch
Is there someone who succeed to use mat-table and who can share his code?
Thank you
Note: MatTableModule is already loaded
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Table | Angular Material
Begin by adding the <table mat-table> component to your template and passing in data. The simplest way to provide data to the table...
Read more >Angular Material Data Table: A Complete Example
In this post, we are going to go through a complete example of how to use the Angular Material Data Table.
Read more >Using Angular Material Mat Table in Angular | Sort | Pagination
angular #angularmaterial # mattable #paginator #sortIn this video, you'll learn how to use Angular Material Table mat-table in your Angular ...
Read more >Using Angular Material Table Mat Table - Code Handbook
Display Data in Mat Table. You can use the getUsers method to fetch the data. You need to predefine the fields you want...
Read more >Displaying Data using Angular 12 Material Tables - Section.io
In this article, we'll be looking at how to use Angular Material Tables to ... <table mat-table [dataSource]="dataSource"> <ng-container ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for reporting the syntax issue - I’ll make a note to add some better error handling to help users catch this mistake sooner
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.