angularjs 我需要以分页 ng-repeat 打印所有页面



我需要打印(发送到打印机)我分页的 ng-repeat 中的所有 100 个元素当我在页面中显示 20 个元素时

我尝试使用AngularPrint,但它不起作用,因为它只打印一页

请问有什么想法吗?

这是我的代码

<table class="table table-bordered">
            <thead>
                <tr class="info">
                    <th ng-click="sort('client')" class="col-md-1" rowspan="2" style="text-align: center; vertical-align: middle;">
                        Klant
                        <span class="glyphicon sort-icon" ng-show="sortKey=='client'" 
                              ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
                    </th>
                    <th class="col-md-2" colspan="2" style="text-align: center; vertical-align: middle;">
                        Total
                    </th>
                    <th ng-click="sort('difference')" class="col-md-1" rowspan="2" style="text-align: center; vertical-align: middle;">
                        Difference
                        <span class="glyphicon sort-icon" ng-show="sortKey=='difference'" 
                              ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
                    </th>
                    <th ng-click="sort('percentage')" class="col-md-1" rowspan="2" style="text-align: center; vertical-align: middle;">
                        Difference %
                        <span class="glyphicon sort-icon" ng-show="sortKey=='percentage'" 
                              ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
                    </th>
                </tr>
                <tr class="info">
                    <th ng-click="sort('firstYear')" class="col-md-1" style="text-align: center; vertical-align: middle;">
                        {{ criteria.firstYear }}
                        <span class="glyphicon sort-icon" ng-show="sortKey=='firstYear'" 
                              ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
                    </th>
                    <th ng-click="sort('secondYear')" class="col-md-1" style="text-align: center; vertical-align: middle;">
                        {{ criteria.secondYear }}
                        <span class="glyphicon sort-icon" ng-show="sortKey=='secondYear'" 
                              ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
                    </th>
                </tr>
            </thead>
            <tbody class="searchable">
                <tr ng-repeat="stat in stats | orderBy:sortKey:reverse" ng-class="stat.total1 >= stat.total2 ? 'danger-row':'success-row'">
                    <td>{{ stat.companyAbbrev }}</td>
                    <td class="td-right">&euro; {{ stat.total1 | number : 2}}</td>
                    <td class="td-right">&euro; {{ stat.total2 | number : 2 }}</td>
                    <td class="td-right">{{ stat.difference | number : 2 }}</td>
                    <td class="td-right">{{ stat.percentage| number : 2 }} %</td>
                </tr>
            </tbody>
        </table>

我不确定,但这听起来像是元素网格? 您的电网使用什么? 我知道AngularUI Grid具有打印和导出到excel的功能以及许多支持文档。 由于其范围,实施起来也可能有点令人生畏。

要回答您对打印功能的评论,请查看此链接: 导出数据教程 当您单击示例中的菜单按钮并选择导出为 pdf 时,它会在单独的浏览器选项卡中打开 pdf,您可以保存或打印该选项卡。

最新更新