Angular uses the @Output decorator and the EventEmitter class to emit events to the parent component. But you can use RxJS streams instead.

The EventEmitter class is actually a wrapper around the RxJs Subject class. If you have an existing Subject or Observable that you want to use as an output, you can directly use it with the @Output decorator.

export class SearchComponent {
// With Angular EventEmitter
search = new EventEmitter<string>();

// With RxJs Subject / Observable
search = this.form.valueChanges.pipe(
map((value) => value.term),