MatTable examples use CdkTable attributes
In the documentation for mat-table the example looks like below:
<mat-table [dataSource]="dataSource">
<!-- User name Definition -->
<ng-container cdkColumnDef="username">
<mat-header-cell *cdkHeaderCellDef> User name </mat-header-cell>
<mat-cell *cdkCellDef="let row"> {{row.username}} </mat-cell>
</ng-container>
<!-- Age Definition -->
<ng-container cdkColumnDef="age">
<mat-header-cell *cdkHeaderCellDef> Age </mat-header-cell>
<mat-cell *cdkCellDef="let row"> {{row.age}} </mat-cell>
</ng-container>
<!-- Title Definition -->
<ng-container cdkColumnDef="title">
<mat-header-cell *cdkHeaderCellDef> Title </mat-header-cell>
<mat-cell *cdkCellDef="let row"> {{row.title}} </mat-cell>
</ng-container>
<!-- Header and Row Declarations -->
<mat-header-row *cdkHeaderRowDef="['username', 'age', 'title']"></mat-header-row>
<mat-row *cdkRowDef="let row; columns: ['username', 'age', 'title']"></mat-row>
</mat-table>
But if u use this with the cdk attributes, it doesn't work as the cdk attributes are no known attributes for mat-header-row etc. It should be mentioned, to add the CdkTableModule or the example should use the corresponding mat attributes.
https://material.angular.io/components/table/overview
I got Below Error [https://material.angular.io/components/table/overview]
Error: Template parse errors: Can't bind to 'dataSource' since it isn't a known property of 'table'.
This was already fixed in https://github.com/angular/components/pull/17612
Seems to have been fixed in master. There are a few leftover places, but they're in internal development apps and I'll clean them up separately.
ok, thanks buddy........
On Sat, Feb 8, 2020 at 3:34 AM Kristiyan Kostadinov < [email protected]> wrote:
Seems to have been fixed in master. There are a few leftover places, but they're in internal development apps and I'll clean them up separately.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular/components/issues/18342?email_source=notifications&email_token=ALN6JN75HMLQSUA2BZSEE5DRBXLFLA5CNFSM4KN2ZYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELEZFZY#issuecomment-583635687, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALN6JN33YL2BVMA3PWGNGQ3RBXLFLANCNFSM4KN2ZYOQ .
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.