Browse Source

Add Current-user.md for Angular

pull/13654/head
Mahmut Gundogdu 4 years ago
parent
commit
04d39d24d3
  1. 20
      docs/en/UI/Angular/Current-User.md
  2. 4
      docs/en/docs-nav.json

20
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.

4
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"

Loading…
Cancel
Save