Bird
0
0

Which of the following is the correct way to import a feature module named ProductsModule into the root module?

easy📝 Syntax Q12 of 15
Angular - Modules
Which of the following is the correct way to import a feature module named ProductsModule into the root module?
Adeclarations: [ProductsModule]
Bimports: [ProductsModule]
Cproviders: [ProductsModule]
Dbootstrap: [ProductsModule]
Step-by-Step Solution
Solution:
  1. Step 1: Recall Angular module metadata

    Feature modules are imported using the imports array in @NgModule.
  2. Step 2: Understand other arrays

    declarations is for components/directives, providers for services, bootstrap for root component.
  3. Final Answer:

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

    Feature modules go in imports = B [OK]
Quick Trick: Import feature modules inside imports array [OK]
Common Mistakes:
  • Putting modules in declarations array
  • Adding modules to providers array
  • Using bootstrap array for modules

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes