Bird
0
0

What is the main purpose of lazy loading modules in Angular?

easy📝 Conceptual Q11 of 15
Angular - Performance Optimization
What is the main purpose of lazy loading modules in Angular?
ATo preload all modules at application start for faster navigation
BTo load modules only when the user navigates to their routes, improving startup speed
CTo bundle all modules into a single large file
DTo disable routing in the application
Step-by-Step Solution
Solution:
  1. Step 1: Understand lazy loading concept

    Lazy loading means loading parts of the app only when needed, not all at once.
  2. Step 2: Identify benefit in Angular context

    Loading modules on demand speeds up the initial app load and reduces bundle size.
  3. Final Answer:

    To load modules only when the user navigates to their routes, improving startup speed -> Option B
  4. Quick Check:

    Lazy loading = load on demand [OK]
Quick Trick: Lazy loading delays module load until route is visited [OK]
Common Mistakes:
  • Thinking lazy loading loads all modules upfront
  • Confusing lazy loading with preloading
  • Assuming lazy loading disables routing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes