|
|
|
@ -101,6 +101,22 @@ export interface RemoteEnv { |
|
|
|
- `method`: HTTP method to be used when retrieving environment config. Default: `GET` |
|
|
|
- `headers`: If extra headers are needed for the request, it can be set through this field. |
|
|
|
|
|
|
|
## Provide Environment Variable to Core Module |
|
|
|
|
|
|
|
`environment` variable comes from angular host application. |
|
|
|
|
|
|
|
```js |
|
|
|
import { environment } from '../environments/environment'; |
|
|
|
|
|
|
|
@NgModule({ |
|
|
|
imports: [ |
|
|
|
//...other imports |
|
|
|
CoreModule.forRoot({ |
|
|
|
environment |
|
|
|
}), |
|
|
|
] |
|
|
|
}) |
|
|
|
``` |
|
|
|
## EnvironmentService |
|
|
|
|
|
|
|
` EnvironmentService` is a singleton service, i.e. provided in root level of your application, and keeps the environment in the internal store. |
|
|
|
|