I have to child components and I want to be able to switch between two sub components but it not working. I have no idea how to implement it here.
This is my example code
HTML
<h3 class="first">Choose View</h3>
<a options="A">A</a>
<a options="B">B</a>
<p>Selected Type: <span style="font-weight: bold">{{selectedType}}</span></p>
<!-- Switching Mechanism -->
<div [ngSwitch]="selectedType">
<li *ngSwitchCase="'A'"> <app-component-a></app-component-a>
<li *ngSwitchCase="'B'"> <app-component-b></app-component-b>
<li *ngSwitchDefault><app-component-b></app-component-b>
</div>