As a WPF developer currently writing an application in Angular, I'm having a hard time finding the equivalent functionality of the WPF ListView together with DataTemplate and DataTemplateSelector. With this feature, I can just bind a list of objects of various types, and define a data template for each type. I can also create a class that selects the appropriate data template based on the item.
In the end, I to display a list of various components based on a list of data objects I pass into it. I haven't found an Angular equivalent with this feature, so I want to build my own component.
The most promising solution I found here using ngFor and template.
I found another way using ngFor with ng-container and ngTemplateOutlet.
With Angular 9 and the Ivy engine, I have learned that it is now possible to dynamically create components.
What is with the current Angular version the best way to accomplish this?