我有一个数据表网格,我想根据所做的选择更改箭头按钮的标题。
例如:默认情况下,列中的数据按降序排序,因此箭头按钮的标题应显示:Ascending sorting Indicator,当列按降序排序时,箭头标题应显示为升序。
<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>