17 lines
395 B
TypeScript
17 lines
395 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { BehaviorSubject } from 'rxjs';
|
|
|
|
@Injectable({
|
|
providedIn: 'root',
|
|
})
|
|
export class SharedService {
|
|
private profilePhotoSource = new BehaviorSubject<string>(null);
|
|
currentProfilePhoto = this.profilePhotoSource.asObservable();
|
|
|
|
constructor() {}
|
|
|
|
changeProfilePhoto(photoUrl: string) {
|
|
this.profilePhotoSource.next(photoUrl);
|
|
}
|
|
}
|