angularJS 使用ui-bootstrap的pagination指令分页数据,controller如何写才是最优雅的写法
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr class="active">
<th>订单号</th>
<th>项目</th>
<th>姓名</th>
<th>手机号</th>
<th>下单日期</th>
<th>使用日期</th>
<th>场次</th>
<th>金额</th>
<th>消费方式</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="order in vm.orders">
<td><a href="">{{order.number}}</a></td>
<td>足球</td>
<td>{{order.user.name}}</td>
<td>{{order.mobile}}</td>
<td>{{order.created_at}}</td>
<td>{{order.order_items[0].start_at}}</td>
<td>
<ul>
<li ng-repeat="item in order.order_items">{{item.venue.name}}号场地:{{item.start_at | dateFormat |
date:'HH:mm'}}-{{item.end_at | dateFormat | date:'HH:mm'}}
</li>
</ul>
</td>
<td>{{order.payment_price | price}}</td>
<td>现场订单</td>
</tr>
</tbody>
</table>
<pagination total-items="vm.totalItems" ng-model="vm.currentPage" ng-change="vm.pageChanged()"
previous-text="上一页" next-text="下一页" max-size="5"></pagination>
</div>
angularui ui-bootstrap pagination controller angularjs
小老虎水果糖
9 years, 4 months ago