Bird
0
0

Which of the following is the correct syntax to bind a form control named email using reactive forms?

easy📝 Syntax Q3 of 15
Angular - Template-Driven Forms
Which of the following is the correct syntax to bind a form control named email using reactive forms?
A<code><input [formControl]="email" /></code>
B<code><input [ngModel]="email" /></code>
C<code><input formControlName="email" /></code>
D<code><input [(ngModel)]="email" /></code>
Step-by-Step Solution
Solution:
  1. Step 1: Identify reactive form syntax

    In reactive forms, formControlName binds controls inside a FormGroup.

  2. Step 2: Differentiate from other bindings

    [formControl] binds a standalone control, ngModel is for template-driven forms.

  3. Final Answer:

    <input formControlName="email" /> -> Option C
  4. Quick Check:

    Reactive form control binding = formControlName [OK]
Quick Trick: Use formControlName inside FormGroup for reactive forms [OK]
Common Mistakes:
MISTAKES
  • Using ngModel syntax in reactive forms
  • Using [formControl] instead of formControlName inside groups

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes