You have a logging service that logs errors to the console in the development environment and sends them to the server in the production environment. How can you switch between different implementations of the logging service depending on the environment?

  • Using 'app.module.ts' file
  • Using 'config.json' file
  • Using 'environment.ts' configuration
  • Using a separate service for each environment
To switch between different implementations of the logging service based on the environment, you can use the 'environment.ts' configuration, which allows you to specify different configurations for each environment.
Add your answer
Loading...

Leave a comment

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