Add login/logout page reloads

This commit is contained in:
Ben Goldsworthy 2021-03-21 14:44:55 +00:00
parent 0a606bc51b
commit 0af31aa8b6
2 changed files with 5 additions and 3 deletions

View file

@ -45,7 +45,8 @@ export class LoginComponent implements OnInit {
.subscribe(
result => {
this.loginStatus = 'success';
this.router.navigate([this.returnUrl]);
this.router.navigate([this.returnUrl])
.then(() => { window.location.reload() });
},
error => {
console.log( error._body );

View file

@ -34,13 +34,14 @@ export class FullLayoutComponent implements OnInit {
}
userLogout() {
console.log('logout clicked');
console.debug('logout clicked');
this.api
.logout()
.subscribe(
result => {
localStorage.clear();
this.router.navigate(['/login']);
this.router.navigate(['/login'])
.then(() => { window.location.reload() });
}
);
}