Angular *ngIf variable with async pipe multiple conditions
问题 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 like: <div *ngIf="users$ | async as users && users.length > 1"> ... </div> Of course, it's possible to use nested *ngIf, like: <div *ngIf="users$ | async as users"> <ng-container *ngIf="users.length > 1"> ... </ng-container> </div> but it'd be really nice to use only one container, not two. 回答1: Simply do it like this