diff --git a/docs/en/UI/Angular/Current-User.md b/docs/en/UI/Angular/Current-User.md new file mode 100644 index 0000000000..820a787b5c --- /dev/null +++ b/docs/en/UI/Angular/Current-User.md @@ -0,0 +1,20 @@ +# Angular UI: Current User + +The current user information stored 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 an 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 f764ca0bf2..b919955c6e 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -981,6 +981,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"