<!-- Using *ngIf (1) -->
<div *ngIf="selectedOption === 'countries'">
<div *ngIf="countryResults$ | async as countryResults">
<app-country-table [apiResults]="countryResults"></app-country-table>
</div>
</div>
<div *ngIf="selectedOption === 'journals'">
<div *ngIf="journals$ | async as journals">
<app-journal-table [apiResults]="journals"></app-journal-table>
</div>
</div>
<!-- Using *ngSwitch (2) -->
<div [ngSwitch]="selectedOption">
<div *ngSwitchCase="'countries'">
<div *ngIf="countryResults$ | async as countryResults">
<app-country-table [apiResults]="countryResults"></app-country-table>
</div>
</div>
<div *ngSwitchCase="'journals'">
<div *ngIf="journals$ | async as journals">
<app-journal-table [apiResults]="journals"></app-journal-table>
</div>
</div>
</div>