'How to specifically titlecase a column in html table?

I have written an html code for a data table where I want to titlecase a particular column. The current code that I have puts all the column values in titlecase. (shown below)

<ng-container *ngIf="column !== 'actions'">
      <td
        mat-cell
        *matCellDef="let element"
        (click)="onCellClicked(element, column)"
      >
        {{ format(element[column], column) | titlecase }}
      </td>
</ng-container>

I wanted to know is there a way to specifically titlecase a column within the display in tag or should I write a separate ng-container where I check with ngIf that it is the column of interest and then apply the titlecase on that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source