aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/app.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ufund-ui/src/app/app.component.ts')
-rw-r--r--ufund-ui/src/app/app.component.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/ufund-ui/src/app/app.component.ts b/ufund-ui/src/app/app.component.ts
index 78fd050..fafffef 100644
--- a/ufund-ui/src/app/app.component.ts
+++ b/ufund-ui/src/app/app.component.ts
@@ -1,10 +1,10 @@
import {Component, OnInit, Inject, ViewContainerRef} from '@angular/core';
import {BehaviorSubject} from 'rxjs';
-import { DOCUMENT } from '@angular/common';
+import {DOCUMENT, Location} from '@angular/common';
import {AuthService} from './services/auth.service';
import {ToastsService} from './services/toasts.service';
import {User, userType} from './models/User';
-import {ActivatedRoute, Router} from '@angular/router';
+import {Router} from '@angular/router';
import {ModalService} from './services/modal.service';
@Component({
@@ -20,10 +20,10 @@ export class AppComponent implements OnInit {
constructor(
private authService: AuthService,
private router: Router,
- private route: ActivatedRoute,
protected toastService: ToastsService,
private viewContainerRef: ViewContainerRef,
protected modalService: ModalService,
+ protected location: Location,
@Inject(DOCUMENT) private document: Document
) {}
@@ -41,6 +41,12 @@ export class AppComponent implements OnInit {
console.log("Key found", dataParsed.key)
}
+ if (this.location.path() == '/cupboard') {
+ console.log("work")
+ } else {
+ console.log(this.location.path())
+ }
+
let theme = localStorage.getItem("theme")
if(!theme) {
// if no color scheme is set, get the system settings