the click event of the parent component can show the child component and hide part of its own content
the click event of the child component can show the hidden content of the parent component and hide itself
parent component app
< div class= "container" >
< div class= "row" >
<div class="col-md-7">
apphomehome
<button class="btn btn-primary">home</button>
</div>
<div class="col-md-4">
<app-home></app-home>
</div>
< / div >
< / div >
subcomponent home
I am home
< button class= "btn btn-primary" > return app < / button >