Finally there is an else condition for *NgIf!

Old:

<p *ngIf="isAuthenticated">
  Logged in as 
</p>
<p *ngIf="!isAuthenticated">
  Please login: <button>Login</button>
</p>

New (Else):

<p *ngIf="isAuthenticated; else userNotLoggedIn">
  Logged in as 
</p>
<ng-template #userNotLoggedIn>
  <p>
    Please login: <button>Login</button>
  </p>
</ng-template>

New (Combining Else And Then):

<div *ngIf="isAuthenticated; then showUser else userNotLoggedIn"></div>
<ng-template #showUser>
  <p>
    Logged in as 
  </p>
</ng-template>
<ng-template #userNotLoggedIn>
  <p>
    Please login: <button>Login</button>
  </p>
</ng-template>

Now you can have just one if-condtion where you can specify “then” or “else”.