Bird
0
0

What happens if you call bootstrapModule() with a module that does not declare a bootstrap component?

medium📝 Predict Output Q5 of 15
Angular - Fundamentals
What happens if you call bootstrapModule() with a module that does not declare a bootstrap component?
AAngular bootstraps the module without any component
BAngular throws a runtime error during bootstrap
CAngular ignores the bootstrap process silently
DAngular bootstraps the first declared component automatically
Step-by-Step Solution
Solution:
  1. Step 1: Recall bootstrapModule requirements

    Modules must declare a bootstrap component to start properly.
  2. Step 2: Identify Angular's behavior if missing bootstrap component

    Angular throws a runtime error if no bootstrap component is declared.
  3. Final Answer:

    Angular throws a runtime error during bootstrap -> Option B
  4. Quick Check:

    Missing bootstrap component = runtime error [OK]
Quick Trick: Modules must declare bootstrap component or error occurs [OK]
Common Mistakes:
  • Assuming Angular picks first component automatically
  • Thinking Angular ignores missing bootstrap silently
  • Believing module can bootstrap without components

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes