mirror of
				https://github.com/Redocly/redoc.git
				synced 2025-11-04 09:47:31 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			603 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			603 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);
 | 
						|
  rightPanelHidden = new BehaviorSubject<any>(false);
 | 
						|
 | 
						|
  searchContainingPointers = new BehaviorSubject<string|null[]>([]);
 | 
						|
 | 
						|
  startLoading() {
 | 
						|
    this.loading.next(true);
 | 
						|
  }
 | 
						|
 | 
						|
  stopLoading() {
 | 
						|
    this.loading.next(false);
 | 
						|
  }
 | 
						|
}
 |