Bird
0
0

Why does Angular recommend using standalone components with bootstrapApplication instead of NgModules for new apps?

hard📝 Conceptual Q10 of 15
Angular - Standalone Components
Why does Angular recommend using standalone components with bootstrapApplication instead of NgModules for new apps?
ABecause standalone components disable Angular's change detection
BBecause NgModules are deprecated and no longer supported
CBecause standalone components reduce complexity and improve tree-shaking
DBecause bootstrapApplication only works with NgModules
Step-by-Step Solution
Solution:
  1. Step 1: Understand Angular's design goals

    Standalone components simplify app structure and help Angular remove unused code (tree-shaking).
  2. Step 2: Evaluate options

    NgModules are still supported but more complex; standalone components are recommended for simplicity and performance.
  3. Final Answer:

    Because standalone components reduce complexity and improve tree-shaking -> Option C
  4. Quick Check:

    Standalone components = simpler and better tree-shaking [OK]
Quick Trick: Standalone components simplify and optimize Angular apps [OK]
Common Mistakes:
  • Thinking NgModules are deprecated
  • Believing standalone disables change detection
  • Confusing bootstrapApplication compatibility

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes