import { FormControl, FormGroup, FormBuilder } from '@angular/forms'; //.. export class TriangleComponent implements OnInit { triangleForm ! : FormGroup; constructor(private formBuilder: FormBuilder) { } ngOnInit(): void { this.triangleForm = this.formBuilder.group( { base: [''], height: [''], area: [''] }); }