Bird
0
0

Given this code snippet, what will Angular do when bootstrapping?

medium📝 component behavior Q13 of 15
Angular - Fundamentals
Given this code snippet, what will Angular do when bootstrapping?
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';

bootstrapApplication(AppComponent);
ABootstrap the AppComponent as a standalone component application
BBootstrap the AppModule as a module-based application
CThrow a syntax error because bootstrapApplication requires a module
DDo nothing because bootstrapApplication is deprecated
Step-by-Step Solution
Solution:
  1. Step 1: Identify bootstrapApplication usage

    bootstrapApplication() is used to start standalone component apps, not modules.
  2. Step 2: Analyze code snippet

    The code calls bootstrapApplication with AppComponent, so it bootstraps that component standalone.
  3. Final Answer:

    Bootstrap the AppComponent as a standalone component application -> Option A
  4. Quick Check:

    bootstrapApplication = standalone component bootstrap [OK]
Quick Trick: bootstrapApplication() starts standalone components only [OK]
Common Mistakes:
  • Confusing bootstrapApplication with module bootstrap
  • Thinking bootstrapApplication is deprecated
  • Expecting syntax error for missing module

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes