2021-02-19 18:50:34 +01:00
|
|
|
import {BehaviorSubject, Observable} from "rxjs";
|
2021-07-14 13:19:57 +02:00
|
|
|
import { Injectable } from "@angular/core";
|
2018-07-06 12:33:16 +02:00
|
|
|
|
2021-07-14 13:19:57 +02:00
|
|
|
@Injectable({
|
|
|
|
providedIn: 'root'
|
|
|
|
})
|
2018-07-06 12:33:16 +02:00
|
|
|
export class SubscribeService {
|
2021-02-19 18:50:34 +01:00
|
|
|
|
|
|
|
private loading: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
|
|
|
private members: BehaviorSubject<number> = new BehaviorSubject<number>(0);
|
|
|
|
|
|
|
|
public setLoading(loading: boolean) {
|
|
|
|
this.loading.next(loading);
|
|
|
|
}
|
|
|
|
|
|
|
|
public setMembers(members: number) {
|
|
|
|
this.members.next(members);
|
|
|
|
}
|
|
|
|
|
|
|
|
public getLoading(): Observable<any> {
|
|
|
|
return this.loading.asObservable();
|
|
|
|
}
|
|
|
|
|
|
|
|
public getMembers(): Observable<any> {
|
|
|
|
return this.members.asObservable();
|
|
|
|
}
|
|
|
|
|
2018-07-06 12:33:16 +02:00
|
|
|
}
|