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
Here's the alternative version, with a little bit cleaner template:
1" [ngIfElse]="noUsersMessage">
{{ user | json }}
No users found
Note that we use users$ | async
2 times. That will work if you add shareReplay() operator to user$
Observable:
public users$: Observable = this.someService.getUsers()
.pipe(shareReplay());
That way, inner template will be able to access last value of the Observable and display the results.
You can try it out on stackblitz.