To ensure a single instance of a service is available throughout the app, set the providedIn property to ________.

  • 'app'
  • 'root'
  • 'shared'
  • 'singleton'
To ensure a single instance of a service is available throughout the app, you should set the providedIn property to 'root'. This means that the service is provided at the application level, and there will be only one instance of the service for the entire app, making it a singleton service that can be injected into multiple components.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *