angular template ngif else 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 ng-container
<ng-container *ngIf="contributeur.deb; else newDeb" >
...
</ng-container>
<ng-template #newDeb>
...
</ng-template>