Browse Source

docs: update the Config-State.md for new method

#4812
pull/4813/head
mehmet-erim 6 years ago
parent
commit
96ee4a7dad
  1. 11
      docs/en/UI/Angular/Config-State.md

11
docs/en/UI/Angular/Config-State.md

@ -127,6 +127,17 @@ const defaultLang = this.config.getSetting("Abp.Localization.DefaultLanguage");
// 'en'
```
### How to Get a Specific Feature From the Store
You can use the `getFeature` method of `ConfigStateService` to get a specific feature from the configuration state. Here is an example:
```js
// this.config is instance of ConfigStateService
const isChatEnabled = this.config.getFeature("Chat.Enable");
// 'en'
```
### How to Get a Specific Permission From the Store
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.

Loading…
Cancel
Save