Your factory:
factory.create(injector);
will return an ComponentRef object, and with this object you can access that component itself.
You could subscribe to that event via:
component.instance.visibility.subscribe(v => ...);
Your factory:
factory.create(injector);
will return an ComponentRef object, and with this object you can access that component itself.
You could subscribe to that event via:
component.instance.visibility.subscribe(v => ...);