ts import { Component , OnInit } from '@angular/core' ; import { FormControl , FormControlName , FormGroup , Validators } from '@angular/forms' ; @ Component ({ selector : 'app-root' , templateUrl : './app.component.html' , styleUrls : [ './app.component.css' ] }) export class AppComponent implements OnInit { title = 'ReactiveForm' ; reactiveForm : FormGroup ; ngOnInit () : void { this . reactiveForm = new FormGroup ({ firstname : new FormControl < string >( '' , Validators . required ), lastname : new FormControl < string >( '' ,[ Validators . required ]), email : new FormControl ( '' ,[ Validators . required , Validators . email ]), dob : new FormControl < number >( 0 ), username : new FormControl ( null ), gender : new FormControl ( 'male' ), ...