Nested FormGroups
-In a large complex application you might have a form with multiple sub-groups
form = new FormGroup({
account: new FormGroup({
username: new FormControl(),
password: new FormControl()
})
})
get username(){
return this.form.get('account.username');
}
<div formGroupName="account">
<div>
<input formControlName="username">
</div>
</div>