Config updated
This commit is contained in:
27
src/app/service/app.config.service.ts
Normal file
27
src/app/service/app.config.service.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Subject } from 'rxjs';
|
||||
import { AppConfig } from '../api/appconfig';
|
||||
|
||||
@Injectable()
|
||||
export class ConfigService {
|
||||
|
||||
config: AppConfig = {
|
||||
theme: 'lara-light-indigo',
|
||||
dark: false,
|
||||
inputStyle: 'outlined',
|
||||
ripple: true
|
||||
};
|
||||
|
||||
private configUpdate = new Subject<AppConfig>();
|
||||
|
||||
configUpdate$ = this.configUpdate.asObservable();
|
||||
|
||||
updateConfig(config: AppConfig) {
|
||||
this.config = config;
|
||||
this.configUpdate.next(config);
|
||||
}
|
||||
|
||||
getConfig() {
|
||||
return this.config;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user