2

Necesito mostrar en mi paginado el total de items que tengo en mi lista pero no logro hacerlo, estoy usando la libreria ngx-pagination para angular pero solo me muestra pagina por pagina pero no me muestra la totalidad de registros que tengo.

<table class="table">
            <thead class="bg-danger text-white">
                <tr>
                    <th>Área</th>
                    <th>Estado Revisión</th>
                    <th>Paso Revisión</th>
                    <th>Fecha</th>
                    <th>Hora</th>
                    <th>Observaciones...</th>
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let proveedor of ListHistorico | paginate: { itemsPerPage: 10, currentPage: page, totalItems: ListHistorico.length }; let i = index" (click)='seleccionIndex(i)' [ngClass]="{'data-selected':indexId === (i)}" style="cursor:pointer" >
                    <td>{{proveedor.AUDAT}}</td>
                    <td>{{proveedor.VBELN}}</td>
                    <td>{{proveedor.VBELN}}</td>
                    <td>{{proveedor.VBELN}}</td>
                    <td>{{proveedor.VBELN}}</td>
                    <td>{{proveedor.VBELN}}</td>
                </tr>                                        
            </tbody>                                    
        </table>
        <div class="card d-flex flex-row pl-3 pt-3 pb-2 mb-3 card col-xl-12 col-lg-12 col-md-12 col-12 col-sm-12 align-items-center h-100 y justify-content-center" >
            <pagination-controls (pageChange)="pageCuantia = $event" directionLinks="true" previousLabel="Anterior" nextLabel="Siguiente" ></pagination-controls>
        </div>

este es mi codigo en donde recorro una lista, obtengo el total de items pero no se como mostrarlo en mi paginado.

0

1 respuesta 1

2

Puedes agregar la propiedad getTotalItems(), aquí te dejo la documentación: https://github.com/michaelbromley/ngx-pagination/blob/master/README.md

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.