From 96ee4a7dadc558369199765122c7f7e6525b1354 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Mon, 20 Jul 2020 15:50:01 +0300 Subject: [PATCH] docs: update the Config-State.md for new method #4812 --- docs/en/UI/Angular/Config-State.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/en/UI/Angular/Config-State.md b/docs/en/UI/Angular/Config-State.md index 089697f064..bda3250b32 100644 --- a/docs/en/UI/Angular/Config-State.md +++ b/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.