我有一个用户列表,在显示所有列表时,我只想显示具有isAvailable = true属性的用户
这是我的对象数组
<div *ngIf="????whatshould i put here?" class="users">
<img *ngFor="let user of users" class="user" src="data:image/bmp;base64,{{sticker.base64}}" (click)="addUser(user)">
</div>
答案 0 :(得分:1)
<div *ngFor="let user of users" class="stickers">
<img *ngIf="user.isAvailable" class="user" src="data:image/bmp;base64,
{{sticker.base64}}" (click)="addUser(user)">
</div>