I have a condition in the template as follows:
<ng-container>
<p *ngFor="let seat of InfoDetails?.seatInfo">
<template *ngIf="seat.section">
Section {{seat?.section}} ,
</template>
<template *ngIf="seat.row">
Row {{seat?.row}},
</template>
<template *ngIf="seat.seatNo">
Seat number {{seat?.seatNo}}
</template>
</p>
</ng-container>
I have dataset that contains row
and seatNo
, but it does not seem to print in the template. what is the issue here?
Read the doc here https://angular.io/guide/structural-directives especially for
So for it we have
ng-container
or use span or div or regular html tag.
or if you still want to use ng-template (not recommended)