Merge pull request #13654 from abpframework/docs/add-get-current-user-example-to-docs

Add Current-user.md for Angular docs
pull/13776/head
Muhammed Altuğ 3 years ago committed by GitHub
commit 1d26ad7262
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

Loading…
Cancel
Save