Use @angular/cdk's PortalOutlet instead of if/else or switches in your templates :)
Why? Because of this:
<ng-container [ngSwitch]="node.type">
<app-cab *ngSwitchCase="'cab'"></app-cab>
<app-flight *ngSwitchCase="'flight'"></app-flight>
<app-train *ngSwitchCase="'train'"></app-train>
<app-walk *ngSwitchCase="'walk'"></app-walk>
</ng-container>
npm install angular-portal-builder
Please have a look at the lib's readme.
You will find a small example application at examples/a2b.
See the example-application on any practice
-branch for katas.
to the Angular Components team!