I am beginner in angular. I am working on project like want to give if else condition in root and if means shows one sidebar1 and else means sidebar2.i do not know am doing correct or not
In app.component.html
<div *ngIf ="show; else hide">
<sidebar1-cmp></sidebar1-cmp>
<ng-template #hide>
<Sidebar2-cmp></sidebar2-cmp>
</ng-template>
</div>
Simply If() { Shows sidebar1} Else {shows sidebar2}
I do not know,how do use this reference variable(#show,#hide) in child components(sidebar1,sidebar2)