Testing FormArray
问题 I have a PhoneNumbersFormComponent whose template looks like : <div [formGroup]="form"> <div formArrayName="numbers"> <input formControlName="countryPrefix"> <input formControlName="number"> </div> </div> I want to pass the default test created by angular-cli's ng g component xxx The first error I got was: Cannot find control with name 'countryPrefix' Which I solved with: beforeEach(() => { fixture = TestBed.createComponent(PhoneNumbersFormComponent); component = fixture.componentInstance;