I have an interface:
export interface Project {
id: number;
name: string;
description: string;
previewHTMLElement: string;
}
That I use in a list:
export const PROJECTLIST: Project[] = [
{id: 1, name: 'a-cool-name', description: 'a cute description', previewHTMLElement: '<img src="assets/images/{{project.name}}.png">'}
]
That I am trying to use in an ngFor directive:
<div *ngFor="let project of projectList">
{{project.previewHTMLElement}}
</div>
But this is just replacing {{project.previewHTMLElement}} with a #Text block that repeats whatever was in the string. I need to be able to put any kind of Element in the string and have it be rendered in as an actual HTMLElement.
What is the proper way to use angular directives to accomplish this goal?