*ngif and else in angular code example
Example 1: ngif using multiple elseif
<ng-container *ngIf="foo === 1;else second"></ng-container>
<ng-template #second>
<ng-container *ngIf="foo === 2;else third"></ng-container>
</ng-template>
<ng-template #third></ng-template>
Example 2: ng if
<ng-template [ngIf]="heroes" [ngIfElse]="loading">
<div class="hero-list">
...
</div>
</ng-template>
<ng-template #loading>
<div>Loading...</div>
</ng-template>