0

I got a static variable as :

static params = new FormArray([]);

and i call it this way :

<div *ngFor="let param of params; index as i"> ... </div>

But i have the following error displayed :

Property 'params' is a static member of type 'SeeDataFrameComponent'

So why can't we iterate with *ngFor in a static Array (formArray) ?

ElisaGab
  • 31
  • 1
  • 8
  • Maybe this will help you ? https://stackoverflow.com/questions/44308795/iterating-through-a-formarray-containing-formgroups-with-ngfor – Emilien Jun 30 '20 at 10:09
  • 1
    There are some good answers here for your problem - https://stackoverflow.com/questions/39193538/how-to-bind-static-variable-of-component-in-html-in-angular-2 – Sam Jun 30 '20 at 10:15
  • you need iterate over `params.controls` – Eliseo Jun 30 '20 at 12:00

0 Answers0