html - 单击主标题时如何隐藏html表格特定的子标题
问题描述
我通过使用“data-ng-repeat”填充主标题、子标题来获得 html 表。具有展开按钮的主标题这些标题正在从数据库中获取数据。我可以隐藏 td 正文项目,但是当我单击主标题时我需要隐藏特定的子标题列我如何在页面加载时隐藏特定的子标题项目我如何接受条件。
<table>
<thead>
<tr>
<th>
<span>{{mainH}}</span>
<span data-ng-click="clickf(first)">+</span>
</th>
</tr>
<tr>
<th data-ng-repeat="SHeader in Subheader">
<span>{{SHeader.Subheader}}</span>
</th> ///this Subheader hide some of the particular sub header items
</tr>
</thead>
<tbody>
<tr data-ng-repeat="data in items">
<td><span>{{data.item0}}</span></td>
<td><span>{{data.item1}}</span></td>
<td data-ng-show="show"><span>{{data.item2}}</span></td>
<td data-ng-show="show"><span>{{data.item2}}</span></td>
</tr>
</tbody>
</table>
Factory.HttpRequest('page.aspx/GetDetails')
.success(function (data) {
var Details = data.d;
$scope.Subheader= Details.SubDescriptionDetails;
}
解决方案
推荐阅读
- javascript - 输入无效时显示工具提示/消息 HTML/JS/CSS/Angularjs
- python - 使用python获取elasticsearch数据库中的唯一字段
- c++ - 未找到所需的 Zlib 库
- sql - SQL查询自定义输出
- angular - 从主页重定向到登录页面时无法隐藏登录页面中的导航栏
- hybris - 在 hybris 后台更改对象标识符
- ruby-on-rails - Rails 5(ajax):参数数量错误(给定1,预期0)
- php - 使用 ajax 向 php 页面发送 post 请求
- angular - 如何在 ngFor 循环中动态定义 formControl 名称?
- compiler-errors - 我有一个 Simulink 模块错误