In step 2 you have not given educations formArray reference in HTML. So to get those Formarray or Forgroup[] you need to create one property on your ProfileEditComponent as below:
get educations(): FormGroup[] {
return (<FormArray>this.multistepForm.controls['educations']).controls as FormGroup[];
}
This will return you all the educations in the form of FormGroup[]. Now you have to use this to bind your controls on HTML. So in your HTML you need to change your step 2 this way:
<div class="card-body" *ngIf="step == 2">
<div *ngFor="let item of educations; index as i">
<div [formGroup]="item">
<div formGroupName="educationDetails">
<h4>Education Details</h4>
<hr>
<div>
<label for="city">City:</label>
<input type="text" formControlName="city">
</div>
<div>
<label for="country">Country:</label>
<input type="text" formControlName="country">
</div>
</div>
</div>
</div>
</div>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…