html - 更改angularjs数据网格中按钮的标题
问题描述
我有一个数据表网格,我想根据所做的选择更改箭头按钮的标题。
例如:默认情况下,列中的数据按降序排序,因此箭头按钮的标题应显示:升序排序指示器,当列按降序排序时,箭头标题应显示升序。
<thead>
<tr>
<th ng-repeat="column in columns" class="text-center sortable"
ng-class="{'sort-asc': grdProjects.isSortBy(column.field, 'asc'),'sort-desc': grdProjects.isSortBy(column.field, 'desc')}"
ng-click="grdProjects.sorting(column.field, grdProjects.isSortBy(column.field, 'asc') ? 'desc' : 'asc')"
ng-style="{'width':column.width}">
<button class="border_less_button sort-indicator" title="{{column.title}} blah Sorting Indicator" ng-if="column.title">
{{column.title}}
</button>
</th>
</tr>
</thead>
解决方案
推荐阅读
- c# - 从 pfx 证书中提取文件 .cer 和文件 .key
- swift - 在 iOS 14 的 SwiftUI 中,在主 App 和 Widget 之间共享数据
- android - 如果我根据特定手机设置字体大小,如何根据android中的屏幕大小更改字体大小?
- php - Laravel在两个日期之间使用leftJoin获取集合总和
- spring - 为什么 Runnable 中的实例变量在执行时消失了?
- dhcp - DDNS 的 ISC-DHCP 和 PowerDNS“无法添加转发映射
到 :意外的错误 - php - Symfony 5 使用 Doctrine-2 自定义类表继承
- powerbi - 如何在 powerbi 中为文件路径创建超链接?
- c# - 零星 System.IO.DirectoryNotFoundException:找不到部分用户上传文件的路径
- javascript - 基于输入状态的标签背景颜色