Header component nb-user doesn't update user name
- Linguagem predominante
- TypeScript
- Estrelas
- 25.7k
- Forks
- 7.9k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
### Issue type
**I'm submitting a ...** (check one with "x")
* [X] bug report
* [ ] feature request
* [ ] question about the decisions made in the repository
### Issue description
**Current behavior:**
I have a service that allows a user to login and logout and I'm updating the [name] input on the nb-user component in the header (header.component.ts). I logout and log back in as another user and update the user information in the header when this happens.
The change is not detected and i'm not sure how to do this correctly or if this is a defect.
**Expected behavior:**
I would update the value that is bound to the nb-user component name attribute and the component would update accordingly.
**Steps to reproduce:**
Bind a value to the name attribute and change it later.
**Related code:**
// header.component.ts snippet
// inserted into ngOnInit
this.authService.getUser().subscribe(user => {
this.userName = user.attributes.name;
console.log(`User logged in: ${this.userName}`);
});
// header.component.html snippet
### Other information:
**npm, node, OS, Browser**
```
```
**Angular, Nebular**
```
```
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.