首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在引导和angularjs中如何通过id获得带有组的表

在引导和angularjs中如何通过id获得带有组的表
EN

Stack Overflow用户
提问于 2018-09-22 12:11:21
回答 1查看 516关注 0票数 0

如何获得唱片组智慧在安古拉杰像下面的图片请帮助我这个..。

代码语言:javascript
复制
<table class="table table-striped table-bordered table-list" id="support_table">
    <thead>
        <tr class="active">

            <th>Voucher Code</th>
            <th>Agent Name</th>
            <th>Ref #</th>
            <th>Arrival Date</th>
            <th>City</th>
            <th>Hotel Name</th>
            <th>In Date</th>
            <th>Nights</th>
            <th>Out Date</th>
            <th>Pax</th>
            <th></th>
            <th></th>
            <th>Action</th>
            <th>Edit</th>
        </tr>
    </thead>
    <tbody>
        <tr class="active" ng-repeat="item in VocuharList ">
            <td>{{item.VoucherId}}</td>
            <td>{{item.Name}}</td>
            <td>{{item.AgentReference}}</td>
            <td>{{item.ArrivalDate | date:'dd-MM-yyyy'}}</td>
            <td>{{item.City}}</td>
            <td>{{item.HotelName}}</td>
            <td>{{item.InDate | date:'dd-MM-yyyy'}}</td>
            <td>{{item.Nights}}</td>
            <td>{{item.OutDate | date:'dd-MM-yyyy'}}</td>
            <td>{{item.Pax}}</td>
            <td></td>
            <td></td>

            <td><button id="viewreport" ng-click="AddRoom(item)" type="button" class="btn yellow btn-outline btn-circle btn-xs  m-b-10">View
                    Report</button></td>
            <td><a target="_self">Edit </a></td>
        </tr>

    </tbody>
</table>

我想要这样的照片

但目前的表格如下:(我要分组,然后显示酒店信息。)

EN

回答 1

Stack Overflow用户

发布于 2018-09-22 12:39:13

您可以将上面的行更改为

代码语言:javascript
复制
<tr class="active" ng-repeat="item in VocuharList | groupBy : 'VoucherId' ">

并在模块中注入角度滤波器。

var app = angular.module('myApp', ['angular.filter']);

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52456551

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档