Is there an easier way to get the count of actual displayed results in an ngFor that has a nested ngIf without?
<div *ngFor="let stuff of things">
<ng-container *ngIf="stuff.key === 'value'">
**I'd like an easier way to get the result of this *ngIf .length and use it elsewhere**
</ng-container>
</div>
I tried to use @ViewChildren and hoped for;
@ViewChildren('myContainerRef') containerRef: QueryList<any>
<label>Count {{ myContainerRef.length }}</label>
<div #myRef *ngFor="let stuff of things">
</div>
but get undefined result. Is my last resort doing a filter on the incoming array to get the count and assign it public vars? Or is there an easier way to get the count of an ngfor results that match a condition / are displayed?