From e59531b95db782c86feb29c8c3c8a9cd067ec952 Mon Sep 17 00:00:00 2001 From: Nikolaos Laskaris Date: Fri, 10 Nov 2017 17:58:34 +0200 Subject: [PATCH] fixed routing on login logout --- dmp-frontend/src/app/app.component.ts | 3 --- dmp-frontend/src/app/services/login/token.service.ts | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dmp-frontend/src/app/app.component.ts b/dmp-frontend/src/app/app.component.ts index b89a622f0..721ed7562 100644 --- a/dmp-frontend/src/app/app.component.ts +++ b/dmp-frontend/src/app/app.component.ts @@ -48,7 +48,6 @@ export class AppComponent implements OnInit { login(){ - console.log("navigating to login") //redirect to login page this.router.navigate(['/login'], { queryParams: { /*refresh : Math.random() ,returnUrl: this.state.url*/ }}); location.reload(); @@ -56,8 +55,6 @@ export class AppComponent implements OnInit { logout(){ this.tokenService.logout(); - this.router.navigate([''], { queryParams: { /*returnUrl: this.state.url*/ }}); - location.reload(); } diff --git a/dmp-frontend/src/app/services/login/token.service.ts b/dmp-frontend/src/app/services/login/token.service.ts index 38f777af6..7344c9b4b 100644 --- a/dmp-frontend/src/app/services/login/token.service.ts +++ b/dmp-frontend/src/app/services/login/token.service.ts @@ -94,6 +94,8 @@ export class TokenService { } this.setProvider(null); + + window.location.reload(); }