I have an Angular4 component that creates dynamically many children as soon as the user press a plus button. The child component has an input select that must send an information to the parent component after option selection.
Children components are being created by ComponentFactoryResolver as the section below
let componentFactory = this.componentFactoryResolver.resolveComponentFactory(MyComponent);
let viewContainerRef = this.anchor.viewContainerRef;
viewContainerRef.createComponent(componentFactory);
The child component has an output using EventEmitter, but nothing happens when the application runs.
I've tried without dynamic creation and works fine.
I searched many examples, but none of them consider angular4 or communication between parent and dynamic created child.