Bird
0
0

What is wrong with this lazy loading route configuration?

medium📝 Debug Q6 of 15
Angular - Modules
What is wrong with this lazy loading route configuration?
{ path: 'settings', loadChildren: () => import('./settings/settings.module').then(m => m.SettingModule) }
AThe module class name is incorrect; it should be SettingsModule
BThe import path should not include './' prefix
CLazy loading requires a string path, not a function
DThe path property must be an array, not a string
Step-by-Step Solution
Solution:
  1. Step 1: Check module class name

    The module class name must exactly match the exported class in the module file.
  2. Step 2: Verify import path

    The './settings/settings.module' path is valid and correct.
  3. Step 3: Confirm syntax

    Using a function with dynamic import() is the correct lazy loading syntax.
  4. Final Answer:

    The module class name is incorrect; it should be SettingsModule -> Option A
  5. Quick Check:

    Module class name must match export [OK]
Quick Trick: Module class name must be exact [OK]
Common Mistakes:
  • Misspelling the module class name
  • Using string syntax instead of dynamic import
  • Incorrect import path format

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes