Brother.component.ts

export class BrotherComponent {

  inputText!: string;

  sisterMessage$?: Observable<string>;

  constructor(private uiService: UiService) {
    this.sisterMessage$ = this.uiService.sisterMessage$;
  }

  onClick(): void {
    this.uiService.brotherSpeak(this.inputText);
  }
}