Last active
February 11, 2023 00:09
-
-
Save roman-bgonz/95ba47ee7046712b8a3ad55a8a25d5db to your computer and use it in GitHub Desktop.
Creates a table with nested list angular
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table id="customers"> | |
<tr> | |
<th>Nombre</th> | |
<th>Tipo Fechs</th> | |
<th>Fecha</th> | |
<th>Enviar correo?</th> | |
</tr> | |
<ng-container *ngFor="let empleado of empleados"> | |
<tr *ngFor="let field of empleado.aniversarios"> | |
<td class="field"> | |
{{ empleado.nombre }} | |
</td> | |
<td class="field"> | |
{{ field.idTipoFecha === 1 ? "Aniversario laboral" : "Cumpleaños" }} | |
</td> | |
<td class="field">{{ field.fecha }}</td> | |
<td class="field"> | |
<input type="checkbox" /> | |
</td> | |
</tr> | |
</ng-container> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dado un arreglo de objetos que dentro tiene otro arreglo, se crea una tabla repitiendo los valores del primer nivel y usando los valores del segundo nivel