Get length of array in ngFor after pipes transformation
Another solution could be the following
<div *ngFor="let item of myArray | customPipe1 | customPipe2; let l = count">
Here is the length of my ngFor : {{l}}
</div>
Plunker Example
See also
- https://github.com/angular/angular/blob/master/packages/common/src/directives/ng_for_of.ts#L15-L17
<div *ngFor="let item of myArray | customPipe1 | customPipe2 as result">
Here is the length of my ngFor : {{result.length}}
</div>
See also https://angular.io/api/common/NgForOf