Note that phones is an array, potentially allowing for many inputs. We can implement this by building a FormArray with this.formBuilder.array and with several helper functions:
src/app/user/profile/profile.component.ts... phones: this.formBuilder.array(this.buildPhoneArray(user ? user.phones : [])),... private buildPhoneArray(phones: IPhone[]) { const groups = [] if (!phones || (phones && phones.length === 0)) { groups.push(this.buildPhoneFormControl(1)) } else { phones.forEach(p => { groups.push(this.buildPhoneFormControl(p.id, p.type, p.number)) }) } return groups } private buildPhoneFormControl(id, type?: string, number?: string) { return this.formBuilder.group({ id: [id], type: [type || '', Validators.required], number: ...