So I’m trying to have a modal filter slides generated by an ngFor. Here’s what I have:
<ion-slides loop="true" autoplay="false"> <ion-slide *ngFor="#category of categories, #i=index"> <ion-list *ngIf="category.show"> ...HTML Content </ion-list> </ion-slide> </ion-slides>
With AngularJS 1, I’d use ng-if on the same line as the ng-for. However, this doesn’t work here; some Googling has revealed this: https://github.com/angular/angular/issues/4792. As such, the best I can do is to put the ngIf on the ion-list beneath the ion-slide, as per the code above. The problem with this, however, is that while the slide content is hidden, the slides are still there (albeit empty). I’d like to only create slides if the category.show property is true. Thanks in advance!