nested for loop in angular
rows = [ {nom: "nom1", composants: ["composant11", "composant12"]}, {nom: "nom2", composants: ["composant21", "composant22"]} ]; <table> <ng-container *ngFor="let row of rows"> <tr *ngFor="let composant of row.composants"> <td> {{ composant }} </td> <td> {{ row.nom }} </td> </tr> <ng-container> </table>
Source: stackoverflow.com