Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

280
Vistas
How to get all module from subModule, using *ngFor loop in angular

TS-code:

modules is an array of objects, which itself contain a nested array of object.

const modules =[{ 
   id: 1,
   module: 'Training Module',
   subModules: [{
        id: 2,
        module: 'Group Creation'
      }, {
        id: 3,
        module: 'Sub Group Creation'
      }, {
        id: 4,
        module: 'Training'
      }, {
        id: 5,
        module: 'Daily Attendance'
      }
    ]
}];

HTML-code:

<tr *ngFor="let module of modules">
  <td>{{ item.subModules[0].module }}</td>    <!-- giving Group Creation -->     
</tr>

Expected Output image description here

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

You can use a virtual container, if you do not want to add an additional element, like this:

<tr *ngFor="let module of modules">
  <td>
    <ng-container *ngFor="let subModule of item.subModules">
      {{ subModule.module }} 
    </ng-container>
  </td>
</tr>

Alternatively, you could create a pipe, that formats the names of your submodules by for example comma separation.

about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda