Im using ngFor for sliding items. But i need to show that items only which have event value upcoming.
I need to only show that array which have the event value active. Thanks
<ion-slide class="slide" *ngFor="let y of upcoming" (click)='details(y)'>
<ion-card class="box" style="background-color: white">
<img [src]="y.picture1" class="image"/>
<div class="row">
<div class="column1" style="background-color: white">
<h3> {{y.days}} Days</h3>
</div>
<div class="column2" style="background-color: white">
<div class="tourdescription">{{y.title}}</div>
<div class="tourdate">{{y.date}}</div>
</div>
</div>
</ion-card>
</ion-slide>
.ts
getUpcoming(){
this.authService.getUpcoming().pipe(
map(actions => actions.map(a => {
const data = a.payload.doc.data();
const id = a.payload.doc.id;
return { id, ...data };
}))
).subscribe(resp=>{
console.log(resp);
this.upcoming = resp;
});
}
