You can use the `getOne` method of `ConfigStateService` to get a specific configuration property from the store. For that, the property name should be passed to the method as parameter.
@ -63,7 +65,7 @@ Please refer to `Config.State` type for all the properties you can get with `get
The `getApplicationInfo` method is used to get the application information from the environment variables stored as the config state. This is how you can use it:
```typescript
```js
// this.config is instance of ConfigStateService
const appInfo = this.config.getApplicationInfo();
@ -79,7 +81,7 @@ Please refer to `Config.Application` type for all the properties you can get wit
The `getApplicationInfo` method is used to get a specific API URL from the environment variables stored as the config state. This is how you can use it:
```typescript
```js
// this.config is instance of ConfigStateService
const apiUrl = this.config.getApiUrl();
@ -95,7 +97,7 @@ This method returns the `url` of a specific API based on the key given as its on
You can use the `getSettings` method of `ConfigStateService` to get all of the settings object from the configuration state. Here is how you get all settings:
You can use the `getGrantedPolicy` method of `ConfigStateService` to get a specific permission from the configuration state. For that, you should pass a policy key as parameter to the method.
@ -190,7 +192,7 @@ Please check out the [localization documentation](./Localization.md) for details
The `dispatchGetAppConfiguration` triggers a request to an endpoint that responds with the application state and then places this response to the `Store` as configuration state.
```typescript
```js
// this.config is instance of ConfigStateService
this.config.dispatchGetAppConfiguration();
@ -203,7 +205,7 @@ Note that **you do not have to call this method at application initiation**, bec
The `dispatchPatchRouteByName` finds a route by its name and replaces its configuration in the `Store` with the new configuration passed as the second parameter.
The `dispatchPatchRouteByName` triggers a state method that finds a route by its name and replaces its configuration in the `Store` with the new configuration passed as the second parameter.
```typescript
```js
// this.config is instance of ConfigStateService
const newRoute: ABP.Route = {
@ -245,7 +247,7 @@ The `newRoute` will be placed as at root level, i.e. without any parent routes a
If you want **to add a child route, you can do this:**
```typescript
```js
// this.config is instance of ConfigStateService
const newRoute: ABP.Route = {
@ -272,7 +274,7 @@ Please refer to `ABP.Route` type for all the properties you can pass to `dispatc
The `dispatchSetEnvironment` places environment variables passed to it in the `Store` under the configuration state. Here is how it is used: