I have a component called wrapper and this is to be reused with different child components. I referred this SO question and this article. But they seem to address only if I know which child component I would be rendering before hand. But in my case, I might even just pass a div
or h2
in there.
Here's the minimal reproduction code
<app-wrapper>
<app-edit-address></app-edit-address>
</app-wrapper>
<app-wrapper>
<div>
<label>Edit Email</label>
<input />
</div>
</app-wrapper>
<app-wrapper>
<h2>
Unauthorized
</h2>
</app-wrapper>
In React I can easily render them just by writing {props.children}
but Angular I don't know how. How can I render children dynamically without knowing the children before hand?