We can create dynamic component and get the instances of component into an array and finally rendered it on template.
For example, we can can consider two widget component, ChartWidget and PatientWidget which extended the class WidgetComponent that I wanted to add in the container.
ChartWidget.ts
...