Bird
0
0

You have a large Angular app with many features. How should you organize modules to keep the app efficient and maintainable?

hard📝 Application Q15 of 15
Angular - Modules
You have a large Angular app with many features. How should you organize modules to keep the app efficient and maintainable?
ACreate feature modules for each feature and import them into a root module
BPut all components and services in one big module
CAvoid modules and declare everything in main.ts
DUse modules only for routing, not for components
Step-by-Step Solution
Solution:
  1. Step 1: Understand modular design benefits

    Breaking the app into feature modules helps manage complexity and improves loading.
  2. Step 2: Apply best practice for large apps

    Each feature module groups related code and is imported by the root module for clear structure.
  3. Final Answer:

    Create feature modules for each feature and import them into a root module -> Option A
  4. Quick Check:

    Feature modules for large apps [OK]
Quick Trick: Use feature modules imported by root module for large apps [OK]
Common Mistakes:
  • Putting all code in one module causing clutter
  • Skipping modules and using main.ts for everything
  • Using modules only for routing, ignoring components

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes