首页 > 解决方案 > 更改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>

标签: htmlangularjs

解决方案


推荐阅读