How to listen to events in the parent element, emitted from entryComponents?
A component injected through entryComponents will instantiate it yourself, then we can simply keep a reference on it and subscribe to the public EventEmitter.
After creating our ComponentPortal we attached it to a PortalOutlet or an OverlayRef. The return value of attach contains the instance of the injected component.
For example, let's say our component is named SomeComponent and has an EventEmitter named someEventEmitter:
let portal = new ComponentPortal(componentFactory.componentType);
let component = overlayRef.attach(portal);
component.instance.someEventEmitter.subscribe(() => {
//Some code
});