15 lines
365 B
TypeScript
15 lines
365 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { BehaviorSubject } from 'rxjs';
|
|
|
|
@Injectable()
|
|
export class ServiceComm {
|
|
private componentTitleSource = new BehaviorSubject<string>("");
|
|
componentTitle = this.componentTitleSource.asObservable();
|
|
|
|
constructor() { }
|
|
|
|
updatedComponentTitle(title: string) {
|
|
this.componentTitleSource.next(title);
|
|
}
|
|
}
|