Bird
0
0

Which of the following is the correct way to create a form control in Angular?

easy📝 Syntax Q12 of 15
Angular - Template-Driven Forms
Which of the following is the correct way to create a form control in Angular?
Aconst name = new FormControl('');
Bconst name = FormControl();
Cconst name = new formcontrol('');
Dconst name = FormGroup('');
Step-by-Step Solution
Solution:
  1. Step 1: Recall Angular form control syntax

    FormControl is a class and must be instantiated with 'new'.
  2. Step 2: Check capitalization and usage

    Correct syntax uses 'new FormControl('')', with capital F and C.
  3. Final Answer:

    const name = new FormControl(''); -> Option A
  4. Quick Check:

    FormControl requires 'new' keyword [OK]
Quick Trick: Use 'new FormControl()' with capital letters [OK]
Common Mistakes:
MISTAKES
  • Omitting 'new' keyword
  • Using wrong capitalization
  • Confusing FormControl with FormGroup

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes