To make a service available only within a specific module, set the providedIn property to the ________ of that module.

  • 'providers'
  • 'imports'
  • 'declarations'
  • 'exports'
To limit the availability of a service to a specific module in Angular, you should set the 'providedIn' property to 'providers' of that module. This ensures that the service is scoped to the module where it's provided and can't be accessed outside of it. The other options ('imports,' 'declarations,' and 'exports') are unrelated to specifying service scope and purpose.
Add your answer
Loading...

Leave a comment

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