Bird
0
0

How can you bootstrap multiple Angular standalone components in the same application?

hard📝 Application Q9 of 15
Angular - Fundamentals
How can you bootstrap multiple Angular standalone components in the same application?
ACall bootstrapApplication() separately for each component
BDeclare all components in a module and bootstrap the module
CUse bootstrapModule() with an array of components
DBootstrap one component and lazy load others
Step-by-Step Solution
Solution:
  1. Step 1: Understand multiple standalone bootstrap approach

    Each standalone component can be bootstrapped individually by calling bootstrapApplication multiple times.
  2. Step 2: Confirm no array or module needed for multiple standalone bootstraps

    bootstrapModule does not accept multiple components; lazy loading is unrelated to bootstrapping multiple roots.
  3. Final Answer:

    Call bootstrapApplication() separately for each component -> Option A
  4. Quick Check:

    Multiple standalone roots = multiple bootstrapApplication calls [OK]
Quick Trick: Bootstrap multiple standalone components by separate bootstrapApplication calls [OK]
Common Mistakes:
  • Trying to bootstrap multiple components via bootstrapModule
  • Passing array of components to bootstrapModule
  • Confusing lazy loading with bootstrapping multiple roots

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes