I have a condition in the template as follows:
Read the doc here https://angular.io/guide/structural-directives especially for
{{hero.name}}The asterisk is "syntactic sugar" for something a bit more complicated. Internally, Angular desugars it in two stages. First, it translates the *ngIf="..." into a template attribute, template="ngIf ...", like this.
{{hero.name}}Then it translates the template attribute into a element, wrapped around the host element, like this.
{{hero.name}}
- The *ngIf directive moved to the element where it became a property binding,[ngIf].
- The rest of the , including its class attribute, moved inside the element.
So for it we have ng-container
Section {{seat.section}} ,
or use span or div or regular html tag.
Section {{seat.section}} ,
or if you still want to use ng-template (not recommended)
Section {{seat.section}} ,