In Angular, to make a service available to the entire application, you should set its providedIn property to ________.

  • 'anywhere'
  • 'app'
  • 'global'
  • 'root'
In Angular, to make a service available to the entire application, you should set its 'providedIn' property to 'root'. This ensures that the service is provided at the root level injector, making it accessible throughout the application. Using 'root' is the recommended approach for most services in Angular applications.
Add your answer
Loading...

Leave a comment

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