Add login/logout page reloads
This commit is contained in:
parent
0a606bc51b
commit
0af31aa8b6
2 changed files with 5 additions and 3 deletions
|
@ -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 );
|
||||
|
|
|
@ -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() });
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Reference in a new issue