import {Injectable} from '@angular/core';
import {BehaviorSubject, Subscription} from 'rxjs';

@Injectable()
export class AppService {

    /**
     * 定义全局主题变量
     */
    private themeSource:BehaviorSubject<string> = new BehaviorSubject('white');
    public theme = this.themeSource.asObservable();

    public setTheme(value: string){
        this.themeSource.next(value);
    }
}
