我是TypeScript的初学者。我正在尝试创建一个循环来迭代我的所有系列:ngFor ="让系列的listList",并显示其模态等于' CT':ngIf =&#34 ; series.instance.modality ==' CT'
我试试这个:
<series [series]=series *ngFor="let series of seriesList; let i = index">
<series *ngIf="series.instance.modality == 'CT'"></series>
</series>
而且:
<series [series]=series
*ngFor="let series of seriesList;
let i = index;
*ngIf="series.instance.modality == 'CT'">
</series>
/////////////// EDIT //////////////:
我试试这个:
<ng-container *ngIf="series.instance.modality == 'CT'">
<series [series]="series" *ngFor="let series of seriesList; let i = index">
</series>
</ng-container>
但这不起作用,因为如果我认为我必须在我之前做我的循环..