ngx-for-else
This library extends ngFor (only when imported) with the ability to provide a template for when there is nothing to loop over.
<div *ngFor="let item of items; else emptyTemplate">
{{ item | json }}
</div>
<ng-template #emptyTemplate>
No items
</ng-template>
Installation
npm i ngx-for-else
License
Special thanks
Aubrey Harris for suggesting the syntax
Pete Bacon Darwin for making a simple solution