import { untilDestroyed } from 'ngx-take-until-destroy';
ngOnInit() {
const factory = this.fr.resolveComponentFactory(HelloComponent);
const ref = this.ref.createComponent(factory);
ref.instance.name = 'World';
ref.instance.someOutput.pipe(untilDestroyed(this)).subscribe(...) <======
}