Bird
0
0

Which of the following is the correct syntax to import FormsModule in an Angular module?

easy📝 Syntax Q3 of 15
Angular - Modules
Which of the following is the correct syntax to import FormsModule in an Angular module?
Aproviders: [FormsModule]
Bdeclarations: [FormsModule]
Cexports: [FormsModule]
Dimports: [FormsModule]
Step-by-Step Solution
Solution:
  1. Step 1: Recall where to add imported modules

    Modules like FormsModule must be added to the imports array to use their features.
  2. Step 2: Verify other arrays' purposes

    Declarations are for components, exports share parts, and providers register services, so they are incorrect here.
  3. Final Answer:

    imports: [FormsModule] -> Option D
  4. Quick Check:

    imports = bring in modules [OK]
Quick Trick: Import modules inside imports array [OK]
Common Mistakes:
  • Putting modules in declarations
  • Adding modules to providers
  • Confusing exports with imports

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes