Blame view

src/app/services/shared-service.service.ts 374 Bytes
522b64d0   Arsisakarn Srilatanart   ทำให้ parent comp...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';

@Injectable()
export class SharedServiceService {

  // title = new Subject<string>();
  title = new BehaviorSubject<string>('default');
  title$ = this.title.asObservable();

  constructor() {
  }

  changedTitle(newTitle: string) {
    this.title.next(newTitle);
  }


}