Does anyone know how in the table from this example: https://stackblitz.com/angular/dlxbkjqaoba?file=app%2Ftable-basic-example.ts
Make it so that the columns are directed horizontally, roughly like in the picture:
Does anyone know how in the table from this example: https://stackblitz.com/angular/dlxbkjqaoba?file=app%2Ftable-basic-example.ts
Make it so that the columns are directed horizontally, roughly like in the picture:
You can use invert the table in an
ngOnInit()
method in the class to give the required data structure and then iterate over the column list in the HTML to give the required columns. Below is an example:ts file:
html file:
and working stackblitz: https://stackblitz.com/edit/angular-h6dvzc
edited stackblitz: https://stackblitz.com/edit/angular-h6dvzc-jjqdpk