Question: What does the Injectable decorator do on this service class?
- It registers a provider for the service that is available only at the root module level, not to any children modules.
- It registers a provider for the service in the root application injector, making a single instance of it available throughout the application.
- It makes it so the service can be injected only in the bootstrapped component for the application.
- It sets up a compile time rule that allows you to put the service type only in the providers metadata property of the root NgModule.
Answer: The correct answer of the above question is Option B:It registers a provider for the service in the root application injector, making a single instance of it available throughout the application.