I am adding child component dynamically using ComponentFactoryResolver and able to using ngModel in the child component but it's working as a one way data binding rather than two way.
I tried by adding child component tag and it's working but in my case I can't add that. So need a solution with ComponentFactoryResolver. Please check the below stackblitz for better understanding. i need the parent component vlue to be update on second text box value change.
const factory = this.componentFactoryResolver.resolveComponentFactory(AppChildComponent);
const component = factory.create(this.ViewContainerRef.parentInjector);
component.instance['childData']=this.parentData;
this.ViewContainerRef.insert(component.hostView);