Hi
I have below lines to get data from parent . I am using Angular material table. I want to display Headers,Columns dynamically in Angular Material table.
@Input() arrHeader: any = [];
@Input() arrGrid: any = [];
Thanls
Hi
I have below lines to get data from parent . I am using Angular material table. I want to display Headers,Columns dynamically in Angular Material table.
@Input() arrHeader: any = [];
@Input() arrGrid: any = [];
Thanls
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jayraj ChhayaPosted Jun 24, 2024, 6:07 AM
To dynamically display headers and columns in an Angular Material table, you can utilize the
@Inputdecorator in Angular. By passing the header and grid data from the parent component to the child component, you can dynamically populate the table.The
DynamicTableComponentreceivesarrHeaderfor headers andarrGridfor grid data. By iterating overarrHeaderand dynamically creating columns, you can achieve a dynamic Angular Material table.Ramco RamcoPosted Jun 24, 2024, 6:40 AM
Hi Jayraj
If i have below code for Header what changes i need to do in Dynamic Table Html.
Thanks