Go to Dashboard
diff --git a/src/app/components/error/error.component.ts b/src/app/components/error/error.component.ts
index 8828f32..8f8fd3b 100644
--- a/src/app/components/error/error.component.ts
+++ b/src/app/components/error/error.component.ts
@@ -1,7 +1,29 @@
-import { Component } from '@angular/core';
+import { Component, OnInit, OnDestroy } from '@angular/core';
+import { ConfigService } from '../../service/app.config.service';
+import { AppConfig } from '../../api/appconfig';
+import { Subscription } from 'rxjs';
@Component({
selector: 'app-error',
templateUrl: './error.component.html',
})
-export class ErrorComponent { }
+export class ErrorComponent implements OnInit, OnDestroy {
+
+ config: AppConfig;
+ subscription: Subscription;
+
+ constructor(public configService: ConfigService){ }
+
+ ngOnInit(): void {
+ this.config = this.configService.config;
+ this.subscription = this.configService.configUpdate$.subscribe(config => {
+ this.config = config;
+ });
+ }
+
+ ngOnDestroy(): void {
+ if(this.subscription){
+ this.subscription.unsubscribe();
+ }
+ }
+}
diff --git a/src/app/components/landing/landing.component.ts b/src/app/components/landing/landing.component.ts
index 5b75fa2..4fe1ea8 100644
--- a/src/app/components/landing/landing.component.ts
+++ b/src/app/components/landing/landing.component.ts
@@ -1,4 +1,7 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
+import { ConfigService } from '../../service/app.config.service';
+import { AppConfig } from '../../api/appconfig';
+import { Subscription } from 'rxjs';
@Component({
selector: 'app-landing',
templateUrl: './landing.component.html',
@@ -49,19 +52,27 @@ import { Component, OnInit, OnDestroy } from '@angular/core';
}
`]
})
-export class LandingComponent implements OnInit {
+export class LandingComponent implements OnInit, OnDestroy {
themeElement: any;
- constructor() { }
+ config: AppConfig;
+
+ subscription: Subscription;
+
+ constructor(public configService: ConfigService) { }
ngOnInit(): void {
+ this.config = this.configService.config;
+ this.subscription = this.configService.configUpdate$.subscribe(config => {
+ this.config = config;
+ });
this.themeElement = document.getElementById('theme-css');
this.themeElement.setAttribute('href','assets/theme/saga-blue/theme.css');
}
ngOnDestroy(): void {
- this.themeElement.setAttribute('href', 'assets/theme/lara-light-indigo/theme.css');
+ this.themeElement.setAttribute('href',`assets/theme/${this.config.theme}/theme.css`);
}
}
diff --git a/src/app/components/login/login.component.html b/src/app/components/login/login.component.html
index 24c5559..f38c712 100644
--- a/src/app/components/login/login.component.html
+++ b/src/app/components/login/login.component.html
@@ -7,15 +7,15 @@

-
Welcome, Isabel!
-
Sign in to continue
+
Welcome, Isabel!
+
Sign in to continue
-
+