angular.js - angularJS 使用ui-bootstrap的pagination指令分页数据,controller如何写才是最优雅的写法
黄舟
黄舟 2017-05-15 16:57:06
0
1
512
<p 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>
  </p>
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

모든 응답(1)
世界只因有你

플러그인 Github 주소를 문의해주세요

최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿