Advanced Angular MCQs with answers Page - 2

You will find multiple-choice questions (MCQs) related to #Advanced Angular here. Go through these questions to prepare effectively for your upcoming exams and interviews.

To view the correct answer for any question, simply click the "Show Answer" button.

Have a question to share? Click on "Add Question" to contribute!

A

Admin • 828.03K Points
Coach

Q. What does providedIn: 'root' do?

  • (A) Creates multiple service instances
  • (B) Provides service at component level
  • (C) Registers service as singleton at root level
  • (D) Disables DI

A

Admin • 828.03K Points
Coach

Q. Which lifecycle hook is used to clean up subscriptions?

  • (A) ngOnInit
  • (B) ngAfterViewInit
  • (C) ngOnDestroy
  • (D) ngDoCheck

A

Admin • 828.03K Points
Coach

Q. Which directive is used to dynamically load templates?

  • (A) ngTemplateOutlet
  • (B) ngContent
  • (C) ngSwitch
  • (D) ngIf

A

Admin • 828.03K Points
Coach

Q. What is the main benefit of standalone components?

  • (A) Require more modules
  • (B) Reduce boilerplate code
  • (C) Disable routing
  • (D) Increase app size

A

Admin • 828.03K Points
Coach

Q. Which operator is best for sequential HTTP calls?

  • (A) mergeMap
  • (B) switchMap
  • (C) concatMap
  • (D) forkJoin

A

Admin • 828.03K Points
Coach

Q. What does trackBy function improve in *ngFor?

  • (A) Security
  • (B) Rendering performance
  • (C) Routing
  • (D) Form validation

A

Admin • 828.03K Points
Coach

Q. Which Angular feature replaces constructor injection in functional APIs?

  • (A) inject()
  • (B) useFactory
  • (C) providers array
  • (D) useClass

A

Admin • 828.03K Points
Coach

Q. What is the purpose of HttpInterceptor?

  • (A) Routing control
  • (B) Global request/response handling
  • (C) State management
  • (D) Template rendering

A

Admin • 828.03K Points
Coach

Q. Which Angular feature allows signals-based reactivity?

  • (A) RxJS Subjects
  • (B) Zone.js
  • (C) Angular Signals
  • (D) ChangeDetectorRef

A

Admin • 828.03K Points
Coach

Q. What does ChangeDetectorRef.detach() do?

  • (A) Destroys the component
  • (B) Stops change detection for the component
  • (C) Refreshes the view
  • (D) Triggers routing
What's Tag

As you may know, questions are organized under broad categories. Each category can include various types of questions. For example, the "History" category might contain questions about the Revolt of 1857, Shivaji Maharaj, Ancient History, Buddhism, and more.

To further refine this organization, we've introduced tags, which act as sub-categories to group questions more specifically.

Verified users can add tags to any question. If you have any suggestions regarding this system, we'd love to hear from you. Contact Us

Learn More