i want to create a ngFor Loop without a div tag.
Is this somehow possible?
My Problem is, that when i use a div *ngFor the slider is broken.
<ion-slides #secondSlider [options]="secondSlideOptions" (ionDidChange)="onSecondSlideChanged()"> <!-- This div should not be there --> <div *ngFor="let set of exercise.sets; let setNumber = index;"> <ion-slide> ... </ion-slide> <ion-slide> ... </ion-slide> </div> </ion-slides>
Is there another way to use ngFor without that div container?
Thanks a lot!
ng-container may be better.
See https://github.com/angular/angular/issues/11994
<ng-container *ngFor="let i of items" > {{i.name}} </ng-container>
<template ngFor let-set [ngForOf]="exercise.sets" let-setNumber="index"> // ... </template>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With