import { Injectable } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { Subject } from 'rxjs-compat';

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

  headerChange$ = new Subject<string>();
  constructor(private browserTitleService: Title) { }

  setHeader(header: string) {
    this.browserTitleService.setTitle(header);
    this.headerChange$.next(header);
  }
}
