Angular Material Table Cell Formatting

后端 未结 4 1382
被撕碎了的回忆
被撕碎了的回忆 2021-02-10 14:04

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:45

    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] }}

提交回复
热议问题