Hi there! I wanna use this great solution but in angular 12 i have a 2 errors which is related with types of directives *ngTemplateOutlet and *ngComponentOutlet. The issue happens in overlay.component.html when angular compile. How we can fix it for new version of angular?
<ng-container [ngSwitch]="contentType">
<ng-container *ngSwitchCase="'string'">
<div class="box">
<div [innerHTML]="content"></div>
</div>
</ng-container>
<ng-container *ngSwitchCase="'template'">
<ng-container ***ngTemplateOutlet="content; context: context"**></ng-container>
</ng-container>
<ng-container *ngSwitchCase="'component'">
<ng-container ***ngComponentOutlet="content"**></ng-container>
</ng-container>
</ng-container>
contentType: 'template' | 'string' | 'component' = 'component';
content: string | TemplateRef<any> | Type<any>;
context;
<ng-container *ngTemplateOutlet="content; context: context"></ng-container>
~~~~~~~~~~~~~~~~
Type 'string | TemplateRef | Type' is not assignable to type 'Type'.
Type 'string' is not assignable to type 'Type'.
<ng-container *ngComponentOutlet="content"></ng-container>
~~~~~~~~~~~~~~~~~