Html 在表头上应用附加的ngclass表达式

Html 在表头上应用附加的ngclass表达式,html,angular,Html,Angular,我试图根据ngclass表达式设置列的背景色。我已经有了一个表达式。如何添加其他表达式。若你们在下面看到我的代码,我将遍历列名并应用ngclass表达式 <table id="LegalFundClass" class="fundClassesTable table-striped"> <tr *ngFor="let c of LegalFundClasses.LegalFundClassColumnNames">

我试图根据ngclass表达式设置列的背景色。我已经有了一个表达式。如何添加其他表达式。若你们在下面看到我的代码,我将遍历列名并应用ngclass表达式

<table id="LegalFundClass" class="fundClassesTable table-striped">
                    <tr *ngFor="let c of LegalFundClasses.LegalFundClassColumnNames">
                        <ng-container
                            *ngIf="c !='Hurdle Rate Basis' && c != 'Hurdle Rate %' && c != 'Hurdle Rate Index' || isHurdle;">
                            <ng-container *ngIf="c !='Clawback %' || isClawback">

                                <th
                                    [ngClass]="c != 'Space1' && c != 'Space2' && c != 'Space3' && c != 'Buttons' ? 'tableItem bold' : 'tableItem cellbgcolor'">
                                    {{ c }}</th>

为多个条件添加以下代码

 <th [ngClass]="[c != 'Space1' && c != 'Space2' && c != 'Space3' && c != 'Buttons' ? 'tableItem bold' : 'tableItem cellbgcolor', 
c == 'TERMS' ? 'mainheading' : '']">{{ c }}</th>
{{c}
试试这个
{{c}
 <th [ngClass]="[c != 'Space1' && c != 'Space2' && c != 'Space3' && c != 'Buttons' ? 'tableItem bold' : 'tableItem cellbgcolor', 
c == 'TERMS' ? 'mainheading' : '']">{{ c }}</th>