title: Add dynamic formArray angular with validation
body: <p>Error on create form array</p>
  <p><strong>core.js:6260 ERROR TypeError: control.registerOnChange is not a function
  at setUpModelChangePipeline (forms.js:3528)
  at setUpControl (forms.js:3405)
  at FormControlDirective.ngOnChanges (forms.js:7382)
  at FormControlDirective.wrapOnChangesHook_inPreviousChangesStorage (core.js:26975)
  at callHook (core.js:4762)
  at callHooks (core.js:4722)
  at executeInitAndCheckHooks (core.js:4662)
  at selectIndexInternal (core.js:9724)
  at Module.ɵɵadvance (core.js:9685)
  at BuildingPartsModalComponent_div_6_Template (test.component.html:37)</strong></p>
  <p>Here is my code
  <strong>Html</strong></p>
  <pre><code>   &lt;form [formGroup]=&quot;demoForm&quot;&gt;
          &lt;div formArrayName=&quot;demoArray&quot; *ngFor=&quot;let arrayItem of arrayItems; let i=index&quot;&gt;
            &lt;input [id]=&quot;arrayItem.parts&quot; type=&quot;checkbox&quot; [formControl]=&quot;arrayItems[i]&quot;&gt;
            &lt;label [for]=&quot;arrayItem.volume&quot; class=&quot;array-item-title&quot;&gt;
              {{arrayItem.name}}&lt;/label&gt;
            &lt;div (click)=&quot;removeItem(i)&quot;&gt;remove item&lt;/div&gt;
          &lt;/div&gt;
          &lt;button (click)=&quot;submit()&quot;&gt;Go&lt;/button&gt;
        &lt;/form&gt;
        &lt;div (click)=&quot;addItem()&quot;&gt;Add new&lt;/div&gt;
  </code></pre>
  <p><strong>TS</strong></p>
  <pre><code>  demoForm: FormGroup;
  
    arrayItems: {
      parts: number;
      name: string;
      volume: string;
    }[];
  
  
  
  ngOnInit(): void {
      this.arrayItems = [{
        parts: 11,
        name: 'Naslov',
        volume: '120'
      }];
      this.demoForm = this.formBuilder.group({
        demoArray: new FormArray([])
      });
    }
  
    get demoArray() {
      return this.demoForm.get('demoArray') as FormArray;
    }
  
    addItem() {
      const item = {
        parts: 11,
        name: 'Naslov2',
        volume: '120'
      };
      this.arrayItems.push(item);
      this.demoArray.push(this.formBuilder.control(false));
    }
  
    removeItem(index) {
      this.arrayItems.splice(index, 1);
      this.demoArray.removeAt(this.demoArray.length - 1);
    }
    submit() {
      console.log(this.demoForm.value);
    }
  </code></pre>
  <p>I made it much simpler that everybody can understand and to help me find the problem, thanks</p>