mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-30 04:23:44 +03:00
22 lines
479 B
TypeScript
22 lines
479 B
TypeScript
'use strict';
|
|
|
|
import { Injectable } from '@angular/core';
|
|
import { Subject } from 'rxjs/Subject';
|
|
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
|
|
|
@Injectable()
|
|
export class AppStateService {
|
|
samplesLanguage = new Subject<string>();
|
|
error = new BehaviorSubject<any>(null);
|
|
loading = new Subject<boolean>();
|
|
initialized = new BehaviorSubject<any>(false);
|
|
|
|
startLoading() {
|
|
this.loading.next(true);
|
|
}
|
|
|
|
stopLoading() {
|
|
this.loading.next(false);
|
|
}
|
|
}
|