I am working with an array of cards that contain download buttons. My goal is to hide the download button in the first div
if I have already downloaded and stored the data in the database, and then display the second div
.
<ion-card *ngFor="let data of itemList.list let i = index">
<ion-card-content>
<div> <!-- I want this to display if *ngIf="n == data.task does not display -->
<ion-button (click)="saveData(data.link)" >Download for offline use</ion-button>
</div>
<div *ngFor="let n of loop"> <!-- loops through keys in the database -->
<div *ngIf="n == data.task"> <!-- if the data.task key exists, the buttons are displayed -->
<div class = "linkButtons">
<ion-button (click)="openForm(data.Type, data.task)"> Open </ion-button>
<ion-button (click)="syncData()">Sync</ion-button>
<ion-button (click)="deleteAudit( n )">Delete</ion-button>
</div>
</div>
</div>
</ion-card-content>
</ion-card>