0
                <table class="table table-hover table-bordered table-striped ">
                    <thead>
                        <tr>
                            <th>{{_('Datum')}}</th>
                            <th>{{_('Tävling')}}</th>
                            <th>{{_('Status')}}</th>
                            <th>{{_('Mästerskap')}}</th>
                            <th>{{_('Typ av tävling')}}</th>
                            <th>{{_('Ort/stad')}}</th>     
                            <th>{{_('Vapengrupper')}}</th>
                            <th>{{_('Anmäld')}}</th>
                            <th>{{_('Anmälningar')}}</th>
                            <th></th>
                        </tr>
                    </thead>
                    
                    <tbody>   // I want to sort this
                   
                        <tr  ui-sref="competition.show({id: competition.id, view: 'information'})" ng-repeat="competition in competitions.competitions.data">
                            <td class="text-nowrap"><% competition.date %></td>
                            <td><% competition.name %></td>
                            <td><% competition.status_human %></td>
                            <td><% (competition.championship.name) ? competition.championship.name : '-' %></td>
                            <td><% competition.competitiontype.name %></td>
                            <td><% competition.contact_city %></td>
                            <td><span ng-repeat="weapongroup in competition.weapongroups" class="label label-default margin-right-5 inline-block"><% weapongroup.name %></span></td>
                            <td>
                                <span ng-repeat="weaponclass in competition.weaponclasses">
                                    <a ui-sref="signup({id: signup.id})" class="label label-primary margin-right-5" ng-repeat="signup in usersignups = (competition.usersignups | filter:{weaponclasses_id: weaponclass.id}: true)"><% (competition.championships_id) ? weaponclass.classname_general : weaponclass.classname %></a>
                                </span>
                            </td>
                            <td class="text-right">
                                <% competition.signups_count %>
                            </td>
                            <td><a ui-sref="competition.show({id: competition.id, view: 'information'})" class="btn btn-primary btn-xs">Visa</a></td>
                        </tr>
                    </tbody>
                </table>
            </div>

在“//我想对此进行排序”部分,我想按列“competition.contact_city”('Ort/stad')对该列表进行排序。现在看起来像这样: 未排序的表

找不到对表格进行排序的方法。它似乎是json代码。

4

0 回答 0