Can methods be utilized on QueryList
within the HTML template?
For example, in the TypeScript file I can use:
@ContentChildren(DonneeEntiteDirective) content!: QueryList<DonneeEntiteDirective>
let test = this.content.find(e => e.name === 'surface');
However, attempting the same thing inside the HTML template does not yield the desired result:
<ng-container [ngTemplateOutlet]="content.find(e => e.name === 'surface')"></ng-container>
The only workaround I found is by doing the following:
<ng-container *ngFor="let template of content">
<ng-container *ngIf="template.name === column" [ngTemplateOutlet]="template.templateRef"></ng-container>
</ng-container>
Is there a more efficient way to achieve this?