Below is the HTML code I attempted: HTML
<ng-container [ngTemplateOutlet]="room"></ng-container>
<ng-template #room1>
test 1
</ng-template>
<ng-template #room2>
test 2
</ng-template>
<ng-template #room3>
test 3
</ng-template>
TS
room = 'room1';
The goal is to display a template based on a variable, for example,
room = 'room1'
, which should then display only the #room1
template.
However, there's an error that says:
Error: templateRef.createEmbeddedView is not a function