I am trying to show one of the headers according to the value of isComplex$
observable in *ngIf:
<complex-header *ngIf="isComplex$ | async; else ordinaryHeader"></complexheader>
<ng-template #ordinaryHeader>
<ordinary-header></ordinary-header>
</ng-template>
The problem is *ngIf
goes with else case without waiting for observable to emit value. How can I accomplish both of headers wait for observable to emit its first value.