How to control each other between parent and child components in angular

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 >

May.23,2021

manipulate the parent component through @ output () exposing methods in the child component

Menu