angular 10 ng-if code example
Example 1: ng if
<ng-template [ngIf]="heroes" [ngIfElse]="loading">
<div class="hero-list">
...
</div>
</ng-template>
<ng-template #loading>
<div>Loading...</div>
</ng-template>
Example 2: ng if
<div *ngIf="condition">