1// Synchronous:
2
3myVar = { hello: '' };
4
5<ng-container *ngIf="myVar; let var;">
6 {{var.hello}}
7</ng-container>
8// Using async pipe:
9
10myVar$ = of({ hello: '' });
11
12<ng-container *ngIf="myVar$ | async; let var;">
13 {{var.hello}}
14</ng-container>
15