Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

253
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!