here's the code that I tried: 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';
What I'm trying to do is to display the template based on the variable for example.
room = 'room1'
then it will display only the template #room1
.
But I'm getting an error which is this one: Error: templateRef.createEmbeddedView is not a function