I don’t see any errors in my Angular code, but when I use the developer tools, the username doesn’t appear due to text interpolation errors.you know the answer?
authservice.ts
public get useraccountValue(): Useraccount{
return this.useraccountSubject.value; }
Useraccount.ts
export class Useraccount{
id:string ='';
username: string='';
name:string='';
password:string='';
email:string=''; }
header.ts
user= this.authservice.useraccountValue;
constructor(private authservice:AuthService) {
//this.user
this.authservice.user.subscribe(x => this.user = x);
console.log(this.user);}
header.html
<ul class="info_ul">
<li>{{user.username}}</li>
<li><a (click)="logout($event)">logout</a></li>
</ul>