TreeTable - Style Certain rows or cell can easily be styled based on conditions. In this example, nodes whose size is in kilobytes are highlighted at row and cell level.
{{col.header}} {{rowData[col.field]}}
View on GitHub

@Component({
    templateUrl: './treetablestyledemo.html',
    styles: [`
        .kb-row {
            background-color: #1CA979 !important;
            color: #ffffff !important;
        }

        .kb-cell {
            background-color: #2CA8B1 !important;
            color: #ffffff !important;
        }
    `]
})
export class TreeTableStyleDemo {

    files: TreeNode[];

    cols: any[];

    constructor(private nodeService: NodeService) { }

    ngOnInit() {
        this.nodeService.getFilesystem().then(files => this.files = files);

        this.cols = [
            { field: 'name', header: 'Name' },
            { field: 'size', header: 'Size' },
            { field: 'type', header: 'Type' }
        ];
    }
}

View on GitHub

<p-treeTable [value]="files" [columns]="cols">
    <ng-template pTemplate="header" let-columns>
        <tr>
            <th *ngFor="let col of columns">
                {{col.header}}
            </th>
        </tr>
    </ng-template>
    <ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
        <tr [ngClass]="{'kb-row': rowData.size.endsWith('kb')}">
            <td *ngFor="let col of columns; let i = index" [ngClass]="{'kb-cell': col.field === 'size' && rowData.size.endsWith('kb')}">
                <p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
                {{rowData[col.field]}}
            </td>
        </tr>            
    </ng-template>
</p-treeTable>