Ng-template / view-container

Following the examples in this video -
It means that this code:
<button (click)=“remove()”>Remove child component
<a-comp #c>

is it a bad practice?
Does custom element (component) always needs to be wrap with ng-template in order to be a part of angular view container?

I’m not sure what you’re asking. @m.koretskyi maybe you can answer this one, since it’s your workshop in the video.

No, you can use dynamic components approach to create a component and add it to the view container. You need to wrap HTML into the template if it contains something that isn’t just a component, like

  <h1>Some title</h1>

as opposed to plain


which can be rendered using dynamic component’s approach.

It’s not exactly clear here what you’re asking, can you elaborate?