outputFromObservable exposes an RxJS observable as a component or directive output. It preserves ordinary parent template event binding while separating RxJS interoperability from the core output API. section 10.3.4
Use it when an existing observable already represents an outward event stream. Unlike a legacy @Output-decorated observable, the modern form makes the RxJS dependency explicit by importing outputFromObservable from @angular/core/rxjs-interop rather than @angular/core. section 10.3.4
Expose container clicks
A component can turn clicks on a referenced container element into a clicked output. A parent continues to consume it with (clicked)="handleClick($event)", while the child derives the events with RxJS fromEvent. section 10.3.4
@ViewChild('containerElement') containerElement: ElementRef<HTMLDivElement>;
clicked = outputFromObservable(fromEvent(this.containerElement, 'click'));
This replacement keeps an observable-backed clicked output without decorating the observable with @Output. section 10.3.4
