front end version 2 de framadate, un gestionnaire de sondage
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

16 lines
461 B

import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
import { User } from '../models/user.model';
@Injectable({
providedIn: 'root',
})
export class UserService {
private _user: BehaviorSubject<User | undefined> = new BehaviorSubject<User | undefined>(undefined);
public readonly user: Observable<User | undefined> = this._user.asObservable();
public updateUser(user: User): void {
this._user.next(user);
}
}