Bird
0
0

Which of the following is the correct syntax to bootstrap an Angular module-based application?

easy📝 Syntax Q12 of 15
Angular - Fundamentals
Which of the following is the correct syntax to bootstrap an Angular module-based application?
AbootstrapApplication(AppComponent);
BplatformBrowserDynamic().bootstrapModule(AppModule);
Cnew Angular().startModule(AppModule);
Dangular.bootstrap(AppComponent);
Step-by-Step Solution
Solution:
  1. Step 1: Recall module-based bootstrap syntax

    Angular uses platformBrowserDynamic().bootstrapModule() to start module apps.
  2. Step 2: Match syntax to options

    Only platformBrowserDynamic().bootstrapModule(AppModule); matches the correct method and syntax.
  3. Final Answer:

    platformBrowserDynamic().bootstrapModule(AppModule); -> Option B
  4. Quick Check:

    Module bootstrap = platformBrowserDynamic().bootstrapModule() [OK]
Quick Trick: Use platformBrowserDynamic().bootstrapModule() for modules [OK]
Common Mistakes:
  • Using bootstrapApplication() for module apps
  • Trying non-existent Angular() constructor
  • Using angular.bootstrap() which is AngularJS syntax

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes