Bird
0
0

Which is the correct syntax to import a shared module named SharedModule into another module?

easy📝 Syntax Q3 of 15
Angular - Modules
Which is the correct syntax to import a shared module named SharedModule into another module?
Aexports: [SharedModule]
Bimports: [SharedModule]
Cproviders: [SharedModule]
Ddeclarations: [SharedModule]
Step-by-Step Solution
Solution:
  1. Step 1: Recall Angular module metadata

    Modules to use in another module must be listed in the imports array.
  2. Step 2: Understand other arrays

    Exports share components outward, providers register services, declarations declare components/directives/pipes.
  3. Final Answer:

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

    Import shared module via imports array [OK]
Quick Trick: Use imports array to bring in shared modules [OK]
Common Mistakes:
  • Putting modules in declarations or providers
  • Confusing exports with imports
  • Forgetting to import the shared module

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes