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

249
Vistas
angular2 listing piped/filtered ngFor results

I got ng2 page with several nested *ngFor each with pipes I want to get the list of inner items in order to do action on all of them.

Something like this:

<div *ngFor="let a of b | x |y | z">
  <div *ngFor="let c of a  | x |y | z">
    <div *ngFor="let d of c">
      <div [service]="(d.item|async)"></div>
    </div>
  </div>
</div>

I want to list all d.item in a single list, and call a method on it.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

found a solution

export class component  {

  @ViewChildren('myVar') createdItems;

  showChildren() {
    console.log(this.createdItems.toArray().length);
  }
  }
<div *ngFor="let a of b | x |y | z">
  <div *ngFor="let c of a  | x |y | z">
    <div *ngFor="let d of c">
      <my-component #myVar [service]="(d.item|async)"></div>
    </div>
  </div>
</div>

over 4 years ago · Santiago Trujillo 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