I have these two following class:
export class Machine {
name = '';
computer = new Computer()
}
export class Computer {
os = '';
}
then on my component using reactive form i have:
ngOnInit() { this.form = this.fb.group(new Machine()) }
and in my template:
<input class="form-control" formControlName="name"> // the name works fine
<input class="form-control" formControlName="computer.os">
and in console i get this error:
Cannot find control with name: 'computer.os'
Is it not possible to use FormBuilder.group like this?