当我在自定义标题上使用ng-if="Event.EventItem.IsShirtsEnabled"
时,标题不适用于上述条件的任何值。这意味着它始终处于隐藏状态。但是正文部分在上述条件下正常工作。你能告诉我为什么吗?提前谢谢。
<table ng-table="ParticipantsParams" class="table" template-pagination="custom/pager">
<thead>
<tr>
//here it's not working
<th ng-if="Event.EventItem.IsShirtsEnabled" class="sortable" ng-class="{'sort-asc': ParticipantsParams.isSortBy('ShirtSize', 'asc'),'sort-desc': ParticipantsParams.isSortBy('ShirtSize', 'desc')}"
ng-click="ParticipantsParams.sorting({'ShirtSize' : ParticipantsParams.isSortBy('ShirtSize', 'asc') ? 'desc' : 'asc'})" rowspan="2">
<div>Shirt Size</div>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in Event.Participants">
<td data-title="'Shirt Size'" ng-if="Event.EventItem.IsShirtsEnabled" sortable="'ShirtSize'">{{item.ShirtSize}}</td>
</tr>
</tbody>
</table>