I would like to avoid to use .subscribe() in this component.
I tried *ngIf="user$ | async as user"
but it did not work.
How can I make a local variable with user$ | async
un order to use it at different places in this view?
<app-xpbar *ngIf="user$ | async"></app-xpbar>
<header class="header">
<app-header-common
(onSearch)="searching($event)">
</app-header-common>
<app-header-user
[user]="user$ | async"
(onLogin)="login($event)"
(onTrial)="trial($event)">
</app-header-user>
</header>