I'm learning angular and i want to create a page with a top navBar.
By pressing on a link on the navbar, I want the correspondent component will be shown.
for example, if i press on the navBar on "ShoppingList" i want that only the shopping list component that is already visible on the page to be shown. If i press on another link, i want that only the matching component be visible.
I have put each component in seperated folder inside the 'app' folder. My question is how can i use ngIf but with component that are in different folder and not all on the same component?
app.component.ts:
<navbarBlack></navbarBlack>
<recipeList></recipeList>
<recipe></recipe>
<shoppingList></shoppingList>
navbar html:
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">{{WebSiteName}}</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="#">{{HomePage}}</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">{{PageA}}
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">{{Page1A}}</a></li>
<li><a href="#">{{Page2A}}</a></li>
<li><a href="#">{{Page3A}}</a></li>
</ul>
</li>
<li><a href="#" (click)="goRecipies()">{{PageB}}</a></li>
<li><a href="#" (click)="goShopList()">{{PageC}}</a></li>
</ul>
</div>
</nav>
the (click) on the