Instantly share code, notes, and snippets.

Embed
What would you like to do?
<div *ngIf="todos.length > 0">
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>TODO</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let todo of todos">
<td>{{ todo.id }}</td>
<td>{{ todo.todo }}</td>
</tr>
</tbody>
</table>
<div class="row justify-content-center" *ngIf="todos.length > 0 && !empty">
<div *ngIf="loading" class="alert alert-warning d-block text-center position-absolute">Cargando datos...</div>
<div class="search-results"
infiniteScroll
[infiniteScrollDistance]="2"
[infiniteScrollThrottle]="50"
(scrolled)="onScroll()">
</div>
</div>
<div *ngIf="empty" class="alert alert-primary d-block text-center">Ya no hay más datos!</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment