# Class ConfigService<Config>

#### Type Parameters

- Config extends Record<string, any> = Record<string, any>

#### Implemented by

- ConfigTestingService

- Defined in lib/config.service.ts:31

#####
Index

### Constructors

constructor

### Properties

config
Config
Defaults
LocalStorageKey
Overwrites
Urls

### Methods

clearLocalConfig
get
getOrThrow
setLocalConfig
Get
Load
LoadConfigDefaultFromUrlParam
SideLoad
loadConfig
showError

## Constructors

### constructor

- new ConfigService<Config>(config?): ConfigService<Config>

- #### Type Parameters

  - Config extends Record<string, any> = Record<string, any>

  #### Parameters

  - config: any = null

  #### Returns ConfigService<Config>

  - Defined in lib/config.service.ts:56

## Properties

### `Readonly` config

config: Config

- Defined in lib/config.service.ts:54

### `Static` Config

Config: any = null

- Defined in lib/config.service.ts:33

### `Static` Defaults

Defaults: any = {}

Static default values for the config object. Will be overwritten by an dynamic config file specified in the Urls array.

- Defined in lib/config.service.ts:40

### `Static` LocalStorageKey

LocalStorageKey: string = 'rxap/config/local-config'

- Defined in lib/config.service.ts:48

### `Static` Overwrites

Overwrites: any = {}

Any value definition in the Overwrites object will overwrite any value form the Defaults values or dynamic config files

- Defined in lib/config.service.ts:46

### `Static` Urls

Urls: any[] = []

#### Deprecated

instead use the url property of the ConfigLoadOptions

- Defined in lib/config.service.ts:53

## Methods

### clearLocalConfig

- clearLocalConfig(): void

- #### Returns void

  - Defined in lib/config.service.ts:310

### get

- get<T>(propertyPath): T

- #### Type Parameters

  - T = any

  #### Parameters

  - propertyPath: string

  #### Returns T

  - Defined in lib/config.service.ts:314
- get<T>(propertyPath, defaultValue): T

- #### Type Parameters

  - T = any

  #### Parameters

  - propertyPath: string
  - defaultValue: NoInferType<T>

  #### Returns T

  - Defined in lib/config.service.ts:315

### getOrThrow

- getOrThrow<T>(propertyPath): T

- #### Type Parameters

  - T = any

  #### Parameters

  - propertyPath: string

  #### Returns T

  - Defined in lib/config.service.ts:320
- getOrThrow<T>(propertyPath, defaultValue): T

- #### Type Parameters

  - T = any

  #### Parameters

  - propertyPath: string
  - defaultValue: NoInferType<T>

  #### Returns T

  - Defined in lib/config.service.ts:321

### setLocalConfig

- setLocalConfig(config): void

- #### Parameters

  - config: Config

  #### Returns void

  - Defined in lib/config.service.ts:306

### `Static` Get

- Get<T, K>(path, defaultValue, config): T

- #### Type Parameters

  - T = any
  - K extends Record<string, any> = Record<string, any>

  #### Parameters

  - path: string
  - defaultValue: T
  - config: Record<string, any>

  #### Returns T

  - Defined in lib/config.service.ts:247

### `Static` Load

- Load(options?, environment?): Promise<void>

- Used to load the app config from a remote resource.

  Promise.all([ ConfigService.Load() ]) .then(() => platformBrowserDynamic().bootstrapModule(AppModule)) .catch(err => console.error(err))

  #### Parameters

  - `Optional` options: ConfigLoadOptions
  - `Optional` environment: Environment

  #### Returns Promise<void>

  - Defined in lib/config.service.ts:74

### `Static` `Private` LoadConfigDefaultFromUrlParam

- LoadConfigDefaultFromUrlParam(param?): {}

- #### Parameters

  - param: string = 'config'

  #### Returns {}

  - Defined in lib/config.service.ts:202

### `Static` SideLoad

- SideLoad(url, propertyPath, required?, schema?): Promise<void>

- #### Parameters

  - url: string
  - propertyPath: string
  - `Optional` required: boolean
  - `Optional` schema: AnySchema

  #### Returns Promise<void>

  - Defined in lib/config.service.ts:228

### `Static` `Private` loadConfig

- loadConfig<T>(url, required?, schema?): Promise<T>

- #### Type Parameters

  - T = any

  #### Parameters

  - url: string
  - `Optional` required: boolean
  - `Optional` schema: AnySchema

  #### Returns Promise<T>

  - Defined in lib/config.service.ts:133

### `Static` `Private` showError

- showError(message): void

- #### Parameters

  - message: string

  #### Returns void

  - Defined in lib/config.service.ts:280