[**@rxap/config v19.1.0-dev.2**](../README.md)

***

[@rxap/config](../globals.md) / ConfigService

# Class: ConfigService\<Config\>

Defined in: [config.service.ts:47](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L47)

## Type Parameters

• **Config** *extends* `Record`\<`string`, `any`\> = `Record`\<`string`, `any`\>

## Constructors

### new ConfigService()

> **new ConfigService**\<`Config`\>(`config`): [`ConfigService`](ConfigService.md)\<`Config`\>

Defined in: [config.service.ts:78](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L78)

#### Parameters

##### config

`any` = `null`

#### Returns

[`ConfigService`](ConfigService.md)\<`Config`\>

## Properties

### config

> `readonly` **config**: `Config`

Defined in: [config.service.ts:76](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L76)

***

### Config

> `static` **Config**: `any` = `null`

Defined in: [config.service.ts:55](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L55)

***

### Defaults

> `static` **Defaults**: `any` = `{}`

Defined in: [config.service.ts:62](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L62)

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

***

### LocalStorageKey

> `static` **LocalStorageKey**: `string` = `'rxap/config/local-config'`

Defined in: [config.service.ts:70](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L70)

***

### onError

> `static` **onError**: `ReplaySubject`\<`unknown`\>

Defined in: [config.service.ts:49](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L49)

***

### onErrorFnc

> `static` **onErrorFnc**: (`error`) => `void`[] = `[]`

Defined in: [config.service.ts:52](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L52)

#### Parameters

##### error

`any`

#### Returns

`void`

***

### onRequestError

> `static` **onRequestError**: `ReplaySubject`\<`Response`\>

Defined in: [config.service.ts:50](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L50)

***

### onRequestErrorFnc

> `static` **onRequestErrorFnc**: (`response`) => `void`[] = `[]`

Defined in: [config.service.ts:53](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L53)

#### Parameters

##### response

`Response`

#### Returns

`void`

***

### Overwrites

> `static` **Overwrites**: `any` = `{}`

Defined in: [config.service.ts:68](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L68)

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

***

### ~~Urls~~

> `static` **Urls**: `never`[] = `[]`

Defined in: [config.service.ts:75](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L75)

#### Deprecated

instead use the url property of the ConfigLoadOptions

## Methods

### clearLocalConfig()

> **clearLocalConfig**(): `void`

Defined in: [config.service.ts:414](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L414)

#### Returns

`void`

***

### get()

#### Call Signature

> **get**\<`T`\>(`propertyPath`): `undefined` \| `T`

Defined in: [config.service.ts:418](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L418)

##### Type Parameters

• **T** = `any`

##### Parameters

###### propertyPath

`string`

##### Returns

`undefined` \| `T`

#### Call Signature

> **get**\<`T`\>(`propertyPath`, `defaultValue`): `T`

Defined in: [config.service.ts:419](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L419)

##### Type Parameters

• **T** = `any`

##### Parameters

###### propertyPath

`string`

###### defaultValue

[`NoInferType`](../type-aliases/NoInferType.md)\<`T`\>

##### Returns

`T`

***

### getOrThrow()

#### Call Signature

> **getOrThrow**\<`T`\>(`propertyPath`): `T`

Defined in: [config.service.ts:424](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L424)

##### Type Parameters

• **T** = `any`

##### Parameters

###### propertyPath

`string`

##### Returns

`T`

#### Call Signature

> **getOrThrow**\<`T`\>(`propertyPath`, `defaultValue`): `T`

Defined in: [config.service.ts:425](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L425)

##### Type Parameters

• **T** = `any`

##### Parameters

###### propertyPath

`string`

###### defaultValue

[`NoInferType`](../type-aliases/NoInferType.md)\<`T`\>

##### Returns

`T`

***

### setLocalConfig()

> **setLocalConfig**(`config`): `void`

Defined in: [config.service.ts:410](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L410)

#### Parameters

##### config

`Config`

#### Returns

`void`

***

### Get()

> `static` **Get**\<`T`, `K`\>(`path`, `defaultValue`, `config`): `T`

Defined in: [config.service.ts:352](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L352)

#### Type Parameters

• **T** = `any`

• **K** *extends* `Record`\<`string`, `any`\> = `Record`\<`string`, `any`\>

#### Parameters

##### path

`string`

##### defaultValue

`undefined` | `T`

##### config

`Record`\<`string`, `any`\>

#### Returns

`T`

***

### Load()

> `static` **Load**(`options`?, `environment`?): `Promise`\<`void`\>

Defined in: [config.service.ts:96](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L96)

Used to load the app config from a remote resource.

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

#### Parameters

##### options?

[`ConfigLoadOptions`](../interfaces/ConfigLoadOptions.md)

##### environment?

`Environment`

#### Returns

`Promise`\<`void`\>

***

### SideLoad()

> `static` **SideLoad**(`url`, `propertyPath`, `required`?, `schema`?): `Promise`\<`void`\>

Defined in: [config.service.ts:333](https://gitlab.com/rxap/packages/-/blob/c459fa39d2fc8f7b9433246faef548fd35a95c8b/packages/angular/config/src/lib/config.service.ts#L333)

#### Parameters

##### url

`string`

##### propertyPath

`string`

##### required?

`boolean`

##### schema?

[`AnySchema`](../type-aliases/AnySchema.md)

#### Returns

`Promise`\<`void`\>
