I want to show one component (one header) inside another, the problem, I think, is that I'm using router-outlet , and when in some component view (parent component) I want to put the component header (child component), and then own content of the parent component:
<!--archivo ComponentePadre.html -->
<app-header><app-header> <!--aqui incluyo el selector del componente hijo -->
<div class="container-fluid text-center barnav">
<ul class="nav nav-pills nav-justified">
<li role="presentation"><a [routerLink]="['/cursos']" >Mis Cursos</a></li>
<li role="presentation"><a [routerLink]="['/agenda']">Mi Agenda</a></li>
<li role="presentation" class="active"><a [routerLink]="['/pacientes']">Mis Pacientes</a></li>
</ul>
</div>
...
It only shows me the content of the child component and nothing of the parent component. However, I realized that if I include the selector of the child component at the end of the file, it shows both the content of the parent component and that of the child component.
Also check that both components are imported into the file app.module.ts