Is it possible to create an angular material mat-table component with extra directives but still keep columns dynamic?
问题 Is there a way to extend a mat-table that automatically includes the matSort directive (and other custom directives that interact with the columns, like filter) and still have the content inside hold the mat-sort-header directives? <mat-table [matSortActive]="sortActive" [matSortDirection]="sortDirection" matSort> <ng-content></ng-content> </mat-table> Here is an example: https://stackblitz.com/edit/angular-bxsavu. I've tried creating a component on its own that just puts <ng-content> inside