我有以下模板:
<div *ngFor="let item of myArray | customPipe1 | customPipe2; let l = length"> Here is the length of my ngFor : {{l}} </div>
不幸的是,ngFor中不存在长度.我如何解决这个问题,以便在我的ngFor中提供长度?
<div *ngFor="let item of myArray | customPipe1 | customPipe2 as result"> Here is the length of my ngFor : {{result.length}} </div>