Say I have a method in my TS file that returns some html that gets injected into the template. I would like to include another component in the return but I cant get it to work.
For example say I have the following method in my TS file:
returnComponent() {
return `<my-component></my-component>`
}
Every time I run this method, it seems to only return the html tags but not the actual component. So after running the method I get
<div>
<my-component>
<!-- nothing here -->
</my-component>
</div>
And I would like to get
<div>
<my-component>
<!-- the contents of 'my-component' -->
</my-component>
</div>
What am I missing? or is this not even possible?