I've some api data..Html Markup in Json format:
[
{
type: 'p',
attributes: [...],
children: [{...},{...}]
}
]
I would like to render that in an angular template. Since the name of the tag come from the api, i need to interpolate the tag name.
i tried this:
<ng-container *ngFor="let el of body">
<{{el.type}}> foo bar</{{el.type}}>
</ng-container>
but got "Unexpected closing tag "{{el.type}}".
expected output:
<p> foobar</p>
And I don't want to use innerHtml directive.