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.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/ufund-ui/src/app/app.component.ts b/ufund-ui/src/app/app.component.ts
index 6f4e1f5..7dc8ffb 100644
--- a/ufund-ui/src/app/app.component.ts
+++ b/ufund-ui/src/app/app.component.ts
@@ -1,6 +1,7 @@
-import {Component, OnInit} from '@angular/core';
+import {Component, OnInit, Inject} from '@angular/core';
import {UsersService} from './services/users.service';
import {BehaviorSubject} from 'rxjs';
+import { DOCUMENT } from '@angular/common';
@Component({
selector: 'app-root',
@@ -13,9 +14,14 @@ export class AppComponent implements OnInit {
currentUser$: BehaviorSubject<string> = new BehaviorSubject<string>("Logged out.");
constructor(
- private userService: UsersService
+ private userService: UsersService,
+ @Inject(DOCUMENT) private document: Document
) {}
+ reloadPage() {
+ this.document.defaultView?.location.reload();
+ }
+
ngOnInit() {
this.userService.getCurrentUserSubject().subscribe(r => {
this.currentUser$?.next(r