学无先后,达者为师

网站首页 编程语言 正文

ionic4 ngFor中使用ngIf

作者:沉、睡 更新时间: 2022-02-03 编程语言

ionic4 ngFor中使用ngIf ;ngfor与ngif同时使用报错

如果想要在ngFor上使用*ngIf的话则需要套一层ng-container

<ng-container *ngFor="let item of items">
     <div *ngIf="item.status">...</div>
</ng-container>

原文链接:https://blog.csdn.net/zz975896590/article/details/119991024

栏目分类
最近更新