Angular JS MCQs with answers Page - 5

Here, you will find a collection of MCQ questions on Angular JS. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 802.91K Points
Coach

Q. Which Angular concept allows a component to be used without being declared in a module?

  • (A) Dynamic component
  • (B) Standalone component
  • (C) Lazy-loaded component
  • (D) Global component

A

Admin • 802.91K Points
Coach

Q. Which RxJS operator is used to transform emitted items from an observable?

  • (A) catchError
  • (B) map
  • (C) filter
  • (D) tap

A

Admin • 802.91K Points
Coach

Q. What is the purpose of a Resolver in Angular routing?

  • (A) To restrict access to routes
  • (B) To fetch data before route activation
  • (C) To log route changes
  • (D) To handle errors in routing

A

Admin • 802.91K Points
Coach

Q. Which method is used to register a route guard in Angular?

  • (A) canActivate
  • (B) registerGuard
  • (C) useGuard
  • (D) setRouteGuard

A

Admin • 802.91K Points
Coach

Q. Which directive is used to apply dynamic styles in Angular?

  • (A) ngStyle
  • (B) ngIf
  • (C) ngSwitch
  • (D) ngClass

A

Admin • 802.91K Points
Coach

Q. What is the role of the 'trackBy' function in *ngFor?

  • (A) To filter items
  • (B) To style items
  • (C) To improve performance by tracking item identity
  • (D) To prevent rendering

A

Admin • 802.91K Points
Coach

Q. What is the default ChangeDetectionStrategy in Angular?

  • (A) Manual
  • (B) Optimized
  • (C) OnPush
  • (D) Default

A

Admin • 802.91K Points
Coach

Q. What is used to perform unit testing in Angular?

  • (A) Karma and Jasmine
  • (B) Mocha and Chai
  • (C) Jest and Enzyme
  • (D) QUnit and Sinon

A

Admin • 802.91K Points
Coach

Q. Which keyword is used for dependency injection in a constructor?

  • (A) inject
  • (B) import
  • (C) private/public/protected
  • (D) new

A

Admin • 802.91K Points
Coach

Q. What does Angular use internally for reactivity and asynchronous programming?

  • (A) Promises
  • (B) Observables
  • (C) Callbacks
  • (D) async/await

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ