How can I use *ngIf else in Angular?

Sometimes I go a step further and use both then and else like this:

<div *ngIf="status === 'loading'; then loadingBlock; else contentBlock"></div>

<ng-template #loadingBlock>
  <p>Loading...</p>
</ng-template>

<ng-template #contentBlock>
  <p>Data is here!</p>
</ng-template>

It’s handy when you have more than a simple true/false situation. You get more control over what appears and when.