javascript - Angular JS - 可排序表
问题描述
我正在使用 AngularJS 开发一个项目,但在对表中的列进行排序时遇到了一些困难。我尝试了很多方法和 javascript 库,但表中的数据是动态的,所以到目前为止没有任何效果。有人可以告诉我如何尝试我的案子吗?在此先感谢:) 这是我的桌子:
<table class="table table-sm table-dark table-bordered" id="tabela">
<thead>
<tr>
<th class="headers" ng-repeat="header in headers track by $index"">{{header}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in rows">
<td class="tbody" ng-repeat="data in row track by $index">{{data}}</td>
</tr>
</tbody>
</table>
解决方案
推荐阅读
- java - 如何获取动态创建的表格的表格宽度?
- github - 如何修复我的 Jekyll 网站,使其仅在本地加载
- html - 拒绝特定浏览器访问我的应用
- java - 尝试进行单元测试时出现“Java.util.NoSuchElement”
- java - 是否可以从 Spring Boot 应用程序的自动配置中排除嵌套配置?
- python - Django如何获得两个模型的关系?
- pyspark - pyspark:如何根据相同 ID 的其他列修改列值
- artifactory - 升级到 6.8.7 后无法列出 nuget 工件
- javascript - 我无法弄清楚如何将 Google Geocoder Api 与另一个 API 结合使用
- python - Python从基础数组创建多个数组