Angular Material Table Cell Formatting

后端 未结 4 595
刺人心
刺人心 2021-02-10 14:21

I\'m using angular material table for displaying data and dyanmically binding the table header and table data. Is there any way to format particaular column\'s cell content dyn

4条回答
  •  有刺的猬
    2021-02-10 14:46

    You can dynamically set the column alignment to right by adding something like, [align]="expression ? 'right' : ''" to the element, so for your code this would look like:

    
            
    {{displayedFields[i].name}} {{ element[col] }}

提交回复
热议问题