Complete the code to create a FormGroup named 'profileForm'.
profileForm = new FormGroup([1]);The FormGroup constructor expects an object with keys as control names and values as FormControl instances.
Complete the code to import the necessary Angular forms class for using FormGroup.
import { [1] } from '@angular/forms';
You need to import FormGroup from @angular/forms to create form groups.
Fix the error in the code to correctly access the 'firstName' control value from the FormGroup.
const firstNameValue = this.profileForm.get([1]).value;The get method expects the control name as a string, so it must be quoted.
Fill both blanks to create a FormGroup with controls 'email' and 'password' initialized with empty strings.
loginForm = new FormGroup({ [1]: new FormControl(''), [2]: new FormControl('') });The keys in the object passed to FormGroup are the control names. Here, they are 'email' and 'password'.
Fill all three blanks to create a FormGroup named 'addressForm' with controls 'street', 'city', and 'zipCode' initialized with empty strings.
addressForm = new FormGroup({ [1]: new FormControl(''), [2]: new FormControl(''), [3]: new FormControl('') });The object keys are the control names: 'street', 'city', and 'zipCode'.