This service is responsible for mutating the EnvironmentState values. It is normally only needed for the load operation, and should not be exposed to the rest of the application unless for functional reasons the properties can be mutated at runtime. Each method returns an EnvironmentResult to make it easy to develop customizations.
EnvironmentService is an interface that must be implemented to mutate the environment store. Can be integrated into any application using the provided default implementation or a custom one.
Below are examples of the expected behavior and some implementation examples. To learn more about environment service and how to create them you can read the documentation.
Angular Environment Service
This service is responsible for mutating the EnvironmentState values. It is normally only needed for the load operation, and should not be exposed to the rest of the application unless for functional reasons the properties can be mutated at runtime. Each method returns an
EnvironmentResult
to make it easy to develop customizations.EnvironmentService is an interface that must be implemented to mutate the environment store. Can be integrated into any application using the provided default implementation or a custom one.
DefaultEnvironmentService
The default environment service implementation to mutate the environment store.
This service is provided by defaut when running
EnvironmentModule.forRoot()
, but can be provided manually.Use cases
Below are examples of the expected behavior and some implementation examples. To learn more about environment service and how to create them you can read the documentation.
Table of Contents
Create a custom service
To create a custom environment service simply complete the next class.
Once implemented must be provided:
EnvironmentModule.forRoot()
.