Here's the html code snippet I am working with
<empty-list [hidden]="!emptylist" text="There is currently No User"</empty-list>
<div *ngFor="let userObser of userObservables">
<ion-item #emptylist *ngIf="userObser | async as user">
<h2>{{user.displayName}}</h2>
<h3>{{user.email}}</h3>
</ion-item>
</div>
I aim to display the empty list only when there are no users and hide it if at least one user exists.
While I can achieve this using a subscribe method, I prefer utilizing the async pipe to avoid the need for manual unsubscription each time. This seems inefficient to me.
Is it possible to create a local variable within the ion-item element that could be referenced outside to control visibility based on its existence? I have tried implementing this idea but haven't had any success yet.