I have the following observable on and Angular component:
count$: Observable<number>;
this.count$ = this.getCount();
By using the following I get the value 0 (Zero);
this.count$.subscribe(x => console.log(x));
On the template I have:
<a routerLink="/dash" *ngIf="(count$ | async)">
<ng-container *ngIf="count$ | async as count">
Count: {{count}}
</ng-container>
</a>
If count$
is 1 I get Count: 1
but if count$
is 0 the content Count: 0
is not even rendered.
Any idea why?