I\'m trying to dynamically create and show component and i need to pass some data into it, so that it knows what to show.
Here is my code:
html part:
Hey there change widgets to widgets = [], otherwise angular will keep calling the method in the ngFor loop. If you console log in the constructor for the component you find this is happening.