Bird
0
0

Which of the following is the correct way to import the CommonModule into an Angular module?

easy📝 Syntax Q12 of 15
Angular - Modules
Which of the following is the correct way to import the CommonModule into an Angular module?
Adeclarations: [CommonModule]
Bimports: [CommonModule]
Cexports: [CommonModule]
Dproviders: [CommonModule]
Step-by-Step Solution
Solution:
  1. Step 1: Identify where modules are added

    Other modules like CommonModule are added inside the imports array to bring their features in.
  2. Step 2: Confirm correct syntax

    Using imports: [CommonModule] is the correct syntax to import a module.
  3. Final Answer:

    imports: [CommonModule] -> Option B
  4. Quick Check:

    Modules go in imports [OK]
Quick Trick: Modules go inside imports array [OK]
Common Mistakes:
  • Putting modules in declarations instead of imports
  • Using exports to import modules
  • Adding modules to providers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes