gpt4 book ai didi

angular - *ng如果检查数组为空则显示消息

转载 作者:太空狗 更新时间:2023-10-29 17:42:26 25 4
gpt4 key购买 nike

<分区>

我使用以下代码检查数组是否为空然后显示消息否则显示列表。但它只显示列表正在工作。 “无消息” 未显示。这里有什么问题吗?

<ion-row *ngFor="let item of globalArray">
<div *ngIf="!globalArray?.length > 0">
<p>No messages</p>
</div>
<div *ngIf="globalArray?.length > 0">
<ion-item>
{{item.message}}
</ion-item>
</div>
</ion-row>

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com