I have been trying to make this work with the component factory and it does not work. Here is my example:
https://stackblitz.com/edit/angular-ist5kj-dgzkke?file=app%2Fapp.component.ts
this works though:
https://stackblitz.com/edit/angular-ist5kj-n263kq?file=app%2Fapp.component.ts
however, the right way to do it is the first one when you create the component and you need to pass in data to the component through the instance. is there a way to make the first option work?