I have a component A which only contain a div with an id and a buttons that renders a component inside the div using innterHTML `document.getElementById('my-router-outlet').innerHTML = '<app-component-b-page></app-component-b-page>';`. But this is not rendering I wonder why?.

I'm trying to avoid using ngIf to be a selector for which component should be rendered for performance reason. Also if I clear the innerHTML does the resources of that component will be cleared?