There\'s quite good doc of using *ngIf in Angular: https://angular.io/api/common/NgIf But, is that possible to have *ngIf async variable and multiple checks on that? Something l
I hit the same issue of needing an *ngIf + async variable with multiple checks.
This ended up working well for me.
0 && (users$ | async) as users"> ...
or if you prefer
0 && (users$ | async); let users"> ...
Explanation
Since the result of the if expression is assigned to the local variable you specify, simply ending your check with ... && (users$ | async) as users
allows you to specify multiple conditions and specify what value you want the local variable to hold when all your conditions succeed.
Note
I was initially worried that using multiple async
pipes in the same expression may create multiple subscriptions, but after some light testing (I could be wrong) it seems like only one subscription is actually made.