Preview:
service:
import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class PerfilService {


  private subject = new Subject<any>();
  bot: any;

  getOutEditPerson() {
    this.subject.next('');
  }

  getgetOutEditPerson(): Observable<any> {
    return this.subject.asObservable();
  }
}

ts envia:

constructor(
  private perfilService: PerfilService,
)

setClose() {
  this.perfilService.getOutEditWork();
}

ts recebe:
changeSubscriptionWork: Subscription;
constructor(
  private perfilService: PerfilService,
) {
  this.changeSubscriptionWork = this.perfilService.getgetOutEditPerson().subscribe(() => {
    this.logoutbtn = true;
    this.geralzone = true;
  });
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter