From 04d39d24d3a3f419d46784f6753da68b5e2e23c2 Mon Sep 17 00:00:00 2001 From: Mahmut Gundogdu Date: Thu, 11 Aug 2022 15:01:41 +0300 Subject: [PATCH 1/4] Add Current-user.md for Angular --- docs/en/UI/Angular/Current-User.md | 20 ++++++++++++++++++++ docs/en/docs-nav.json | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 docs/en/UI/Angular/Current-User.md diff --git a/docs/en/UI/Angular/Current-User.md b/docs/en/UI/Angular/Current-User.md new file mode 100644 index 0000000000..0d0f9c024c --- /dev/null +++ b/docs/en/UI/Angular/Current-User.md @@ -0,0 +1,20 @@ +# Angular UI: Current User + +Current user information store in Config State. + +### How to Get a Current User Information Configuration + +You can use the `getOne` or `getOne$` method of `ConfigStateService` to get a specific configuration property. For that, the property name should be passed to the method as parameter. + +```js +// this.config is instance of ConfigStateService + +const currentUser = this.config.getOne("currentUser"); + +// or +this.config.getOne$("currentUser").subscribe(currentUser => { + // use currentUser here +}) +``` + +> See the [ConfigStateService](./Config-State-Service) for more information. diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index db63a7136b..f124e7ead7 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -977,6 +977,10 @@ "text": "Authorization", "path": "UI/Angular/Authorization.md" }, + { + "text": "Current User", + "path": "UI/Angular/Current-User.md" + }, { "text": "HTTP Requests", "path": "UI/Angular/HTTP-Requests.md" From e9d3919ccc8fcccc5aee7cc7fda120bfc501fff1 Mon Sep 17 00:00:00 2001 From: Mahmut Gundogdu Date: Thu, 11 Aug 2022 15:02:56 +0300 Subject: [PATCH 2/4] Update Current-User.md --- docs/en/UI/Angular/Current-User.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/UI/Angular/Current-User.md b/docs/en/UI/Angular/Current-User.md index 0d0f9c024c..26ca4834b8 100644 --- a/docs/en/UI/Angular/Current-User.md +++ b/docs/en/UI/Angular/Current-User.md @@ -1,6 +1,6 @@ # Angular UI: Current User -Current user information store in Config State. +The current user information store in Config State. ### How to Get a Current User Information Configuration From a9f457eb25e498d1c3f2bb304d85bec551addf28 Mon Sep 17 00:00:00 2001 From: Mahmut Gundogdu Date: Fri, 12 Aug 2022 14:59:03 +0300 Subject: [PATCH 3/4] Update Current-User.md --- docs/en/UI/Angular/Current-User.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/UI/Angular/Current-User.md b/docs/en/UI/Angular/Current-User.md index 26ca4834b8..90db8d12fa 100644 --- a/docs/en/UI/Angular/Current-User.md +++ b/docs/en/UI/Angular/Current-User.md @@ -1,6 +1,6 @@ # Angular UI: Current User -The current user information store in Config State. +The current user information stored in Config State. ### How to Get a Current User Information Configuration From 605a4538958c3153f801feded6350854cba0032c Mon Sep 17 00:00:00 2001 From: Hamza Albreem <94292623+braim23@users.noreply.github.com> Date: Fri, 12 Aug 2022 15:09:53 +0300 Subject: [PATCH 4/4] tiny addition --- docs/en/UI/Angular/Current-User.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/UI/Angular/Current-User.md b/docs/en/UI/Angular/Current-User.md index 90db8d12fa..820a787b5c 100644 --- a/docs/en/UI/Angular/Current-User.md +++ b/docs/en/UI/Angular/Current-User.md @@ -7,7 +7,7 @@ The current user information stored in Config State. You can use the `getOne` or `getOne$` method of `ConfigStateService` to get a specific configuration property. For that, the property name should be passed to the method as parameter. ```js -// this.config is instance of ConfigStateService +// this.config is an instance of ConfigStateService const currentUser = this.config.getOne("currentUser");