由Angular命令

时间:2017-09-11 11:16:48

标签: angularjs sorting

我在排序数据时遇到问题。我从JSON获取数据。然后,通过某些公式,我得到结果并对它们进行排序。我有一个排序问题,我需要每个列点击排序,但有一次我不排序

<input id="dating" class="switch" type="checkbox" name="dating" value="1" <?php if(isset($_POST['dating'])) echo 'checked'; ?> />

<div class="col-sm-12">
<table border="0" class="table">
    <tr>
        <th ng-click="sortBy('session')">TYPE</th>
        <th>HEIGHT</th>
        <th>TIME</th>
        <th>DISTANCE</th>
        <tr ng-repeat="y in playerStatisticSession|orderBy:heartrate">
            <td ng-if="sendParams() == y.player_id">{{y.type}}</td>
            <td ng-if="sendParams() == y.player_id">{{getHeight(y.player_id) | number: 2}}</td>
            <td ng-if="sendParams() == y.player_id">*****</td>
            <td ng-if="sendParams() == y.player_id">{{getMaxDistance(y.player_id, y.table_activity_ID) / x.max * 100 | number:2}}% ({{getMaxDistance(y.player_id,
                y.table_activity_ID)}})
            </td>
        </tr>
</table>

0 个答案:

没有答案