Html 试图隐藏ng repeat的第一列和第三列

Html 试图隐藏ng repeat的第一列和第三列,html,angularjs,html-table,angularjs-ng-repeat,Html,Angularjs,Html Table,Angularjs Ng Repeat,我有一个表,它对列使用ng repeat,现在我想隐藏第一列和第三列。有人知道我会怎么做吗 ng-hide="$first&&$third" 没用 这就是它的外观: <th role="columnheader" ng-repeat="column in tableColumns" ng-hide="$first&&$third" ng-if="column.visible">{{column.displayName}}</th> {

我有一个表,它对列使用ng repeat,现在我想隐藏第一列和第三列。有人知道我会怎么做吗

ng-hide="$first&&$third" 
没用

这就是它的外观:

<th role="columnheader" ng-repeat="column in tableColumns" ng-hide="$first&&$third" ng-if="column.visible">{{column.displayName}}</th>
{{column.displayName}

您可以使用计数器进行此操作。并检查计数器的值以添加列。请参阅下面的代码作为参考

<tr ng-repeat="obj in OrderList">
     <td>{{obj.ID}}</td>
     <td>{{obj.Name}}</td>
     <td ng-if="((++$index != 3)||($index != 1))">
         <i>Delete</i>
     </td>
</tr>

{{obj.ID}
{{obj.Name}
删除

希望这有帮助。

这将隐藏数组中第一和第三位置的任何值

<span ng-hide="($index + 1) == ($first || ($first + 3))">{{val.CompID}}</span> 
{{val.CompID}