authState$ is an Observable variable of type
{
...
isAuthenticated: boolean;
user: User | null;
}
User property is initiated on ngrx effect init if the user is authenticated.
the error is that the code below in template return cannot read property fullName of undifined
<div *ngIf="(this.authState$ | async).isAuthenticated" >
{{ (this.authState$ | async).user.fullName || '' }}
</div>
I tried this solution
{{ (this.authState$ | async).user ? (this.authState$ | async).user.fullName : '' }}
but it turned out that it doesn't listening for changes and I have to reload the page