angular else if in html code example
Example 1: ngif else
<div *ngIf="isLoggedIn; else loggedOut">
Welcome back, friend.
</div>
<ng-template #loggedOut>
Please friend, login.
</ng-template>
Example 2: ngIf else
content_copy
<div *ngIf="condition; then thenBlock else elseBlock"></div>
<ng-template #thenBlock>Content to render when condition is true.</ng-template>
<ng-template #elseBlock>Content to render when condition is false.</ng-template>
Example 3: ng if
<div *ngIf="condition">
Example 4: ng elseif
<ng-container *ngIf="tipo_template === 0">
</ng-container>
<ng-container *ngIf="tipo_template === 1">
</ng-container>
<ng-container *ngIf="tipo_template === 2">
</ng-container>