Put in order · Angular course · Module 1: Introduction to Angular

Registering a service in root

Arrange in one line the correct decorator that registers a service globally:

Items to put in order

  • { providedIn:
  • @Injectable(
  • 'root'
  • })
Show the answer

Correct order:

  1. @Injectable(
  2. { providedIn:
  3. 'root'
  4. })